Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> ... are there any standard functions that would return "/home/bob" or will I have to write my own subroutine to get rid of the ..'s?
My solution to this problem has been to grab File::VirtualPath. It's not standard, but at least you wouldn't have to write your own ...
And of course you could wrap all that up in a sub if you like. I like this particular solution because it works even if you're referring to a path that doesn't exist (maybe it doesn't exist yet, but it will, or it's a path to something other than a physical file in the file system). HTH. In reply to Re: rel2abs doesn't resolve relative paths?
by Oberon
|
|