in reply to relative paths
sub relpath { my ($from, $to) = @_; my @f = split '/', $from; my @t = split '/', $to; while (@f and @t) { shift(@f), shift(@t), next if $f[0] eq $t[0]; return join '/', ("..") x @f, @t; } return "./"; }
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|