in reply to rel2abs of a path with tilda

~ means $ENV{HOME} on most systems.

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

update

corrected typo s/tilda/tilde/ for searchability, sorry Tilda ...

Replies are listed 'Best First'.
Re^2: rel2abs of a path with tilda
by ovedpo15 (Pilgrim) on Jun 06, 2021 at 13:35 UTC
    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?
      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