sub absolute_url ($$) { my ($base,$url) = @_; $base =~ s{/[^/]*$}{/}; # remove file from base $url = $base.$url; # append base and url 1 while ( $url =~ s{/[^/]*/\.\./}{/} ); # remove .. return $url; # all done! }
In reply to Re: Minimizing paths?
by sharkey
in thread Minimizing paths?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |