sub Resolve { my @stack = $_[0] =~ /^\./ ? split /\/, $ENV{ PWD } : (); join '/', map { ( $_ eq '..' ) ? pop @stack : ( $_ ne '.' ) && ( push @stack, $_); } split /\/, $_[0]; }
-M
Free your mind
In reply to Re: cleaning up absolute path without resolving symlinks
by Moron
in thread cleaning up absolute path without resolving symlinks
by leocharre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |