[Israel.pm] Cwd::abs_path and "~"
Shlomo Yona
shlomo at cs.haifa.ac.il
Wed Feb 11 06:31:07 PST 2004
On Wed, 11 Feb 2004, Offer Kaye wrote:
> Hi,
> I'm trying to pass a path containing the tilda "~" sign in the beginning to
> Cwd's abs_path fuction, but I get back undef instead of the full path:
>
> use Cwd qw(abs_path);
> my $full_path = abs_path("~/some/path") or die "Couldn't resolve path\n";
>
> I'm running perl 5.8.0 under Linux. Does anybody know why this is failing?
> P.S., I don't need a workaround, there are many ways to go around this
> problem, I'm just curious as to why this doesn't work. Nothing in Cwd's
> documentation suggests this should fail.
>
> Thanks,
> ----------------------------------
> Offer Kaye
>
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://www.perl.org.il/mailman/listinfo/perl
>
> YAPC::Israel::2004
> http://www.perl.org.il/YAPC/2004/
>
--
Shlomo Yona
shlomo at cs.haifa.ac.il
http://cs.haifa.ac.il/~shlomo/
More information about the Perl
mailing list