I just realized I could use URI to make full pathnames into relative pathnames:
my $dispname = URI->new("file://$filename")->rel("file://$startpath");
This way, if
$filename="/home/alester/tw/intro/about.html"
and
$startpath="/home/alester/tw/"
then
$dispname="intro/about.html"
That construct, modulo the "file://", is stolen from Sean Burke's excellent Perl & LWP, page 56.
File::Spec (Score:2)
Of course, that doesn't have the fun of misuse.
Re:File::Spec (Score:1)
Thanks for pointing it out.
--
xoa