Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: rel2abs of a path with tilde (updated)

by haukex (Bishop)
on Jun 06, 2021 at 15:40 UTC ( #11133596=note: print w/replies, xml ) Need Help??

in reply to rel2abs of a path with tilda

I have a bunch of paths and for each path I want to convert it from relative path to absolute path.

Have a look at Path::ExpandTilde. Note that the resulting path will be dependent on the system this function is being run on and the current username.

Update: Note the docs of File::Spec's rel2abs: "No checks against the filesystem are made." But if you don't mind going out to the filesystem, you can also use Cwd's abs_path.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11133596]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2021-07-27 15:03 GMT
Find Nodes?
    Voting Booth?

    No recent polls found