P
pt
I'm doing this:
use Cwd qw/abs_path/ ;
print "path to script = ",abs_path($0),"\n" ;
And I get this:
C:\>perl temp\Util.pl
Uncaught exception from user code:
Cannot chdir to temp\Util.pl: No such file or directory at
temp\Util.pl line 147
Cwd::_croak('Cannot chdir to temp\Util.pl: No such file or
directory') called at C:/Program Files/ActiveState
/Perl/lib/Cwd.pm line 432
Cwd::fast_abs_path('temp\Util.pl') called at temp\Util.pl line
147
The help implies that it should return the path of the argument (the
script name): abs_path and friends
These functions are exported only on request. They each take a single
argument and return the absolute pathname for it. If no argument is
given they'll use the current working directory.
Version info:
This is perl, v5.8.3 built for MSWin32-x86-multi-thread
(with 8 registered patches, see perl -V for more detail)
Copyright 1987-2003, Larry Wall
Binary build 809 provided by ActiveState Corp.
http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Feb 3 2004 00:28:51
use Cwd qw/abs_path/ ;
print "path to script = ",abs_path($0),"\n" ;
And I get this:
C:\>perl temp\Util.pl
Uncaught exception from user code:
Cannot chdir to temp\Util.pl: No such file or directory at
temp\Util.pl line 147
Cwd::_croak('Cannot chdir to temp\Util.pl: No such file or
directory') called at C:/Program Files/ActiveState
/Perl/lib/Cwd.pm line 432
Cwd::fast_abs_path('temp\Util.pl') called at temp\Util.pl line
147
The help implies that it should return the path of the argument (the
script name): abs_path and friends
These functions are exported only on request. They each take a single
argument and return the absolute pathname for it. If no argument is
given they'll use the current working directory.
Version info:
This is perl, v5.8.3 built for MSWin32-x86-multi-thread
(with 8 registered patches, see perl -V for more detail)
Copyright 1987-2003, Larry Wall
Binary build 809 provided by ActiveState Corp.
http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Feb 3 2004 00:28:51