http://qs321.pair.com?node_id=678598


in reply to How do monks create paths?

For unixy stuff I use this. It gives me an absolute path without worrying about how trailing slashes were handled.
sub abspath { # split anything that looks like a unix path seperator + my @tokens = map { defined $_ and split /\/+/ } @_; @tokens = grep { $_ ne '' } @tokens; return join( '/', '', @tokens ); }
Which could adapted to use File::Basename which would handle other OS's.
grep
One dead unjugged rabbit fish later...