in reply to How do monks create paths?
Which could adapted to use File::Basename which would handle other OS's.sub abspath { # split anything that looks like a unix path seperator + my @tokens = map { defined $_ and split /\/+/ } @_; @tokens = grep { $_ ne '' } @tokens; return join( '/', '', @tokens ); }
|
---|