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:
--jwest
would probably do the trick.use File::Spec; my $FileName; my $homedir = $ENV{HOME}; if ($FileName =~ /^~/) { $FileName =~ s/^~//; $FileName = File::Spec->catfile($homedir, $FileName); }
--jwest
-><- -><- -><- -><- -><- All things are Perfect To every last Flaw And bound in accord With Eris's Law - HBT; The Book of Advice, 1:7
In Section
Seekers of Perl Wisdom