http://www.perlmonks.org?node_id=156987


in reply to How to convert unix ~path (tilde) to full path

The 'HOME' environment variable is set to the home directory of the user, so:
use File::Spec; my $FileName; my $homedir = $ENV{HOME}; if ($FileName =~ /^~/) { $FileName =~ s/^~//; $FileName = File::Spec->catfile($homedir, $FileName); }
would probably do the trick.
--jwest


-><- -><- -><- -><- -><-
All things are Perfect
    To every last Flaw
    And bound in accord
         With Eris's Law
 - HBT; The Book of Advice, 1:7