in reply to Re: rel2abs of a path with tilde
in thread rel2abs of a path with tilda

Yes that I know. The question is, do I need to handle it myself (replace ~ with $ENV{HOME}) or is there a better way to do it?

Replies are listed 'Best First'.
Re^3: rel2abs of a path with tilde
by LanX (Saint) on Jun 06, 2021 at 14:03 UTC
    Yes, after replacing it's not a relative path anymore.

    Most probably there is a module doing all this.

    Look into File::Path and similar namespaces on CPAN

    EDIT

    have a look into Path::Tiny, it seems to do the job

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery