At 21:10 -0600 9/3/09, Doug McNutt wrote:

At 22:24 -0400 3/9/09, Chris Devers wrote:
How can a Perl script reliably, portably resolve the path inside which
it is running?...

$0 That's a zero. Has always worked for me to produce a full path to a running perl script.

...There is a module "cwd"...

or rather Cwd.  $0 will give the name but not the full path, so I'd suggest
the following:

use Cwd;
my $currentdir = cwd();
print "$currentdir/$0\n";


Reply via email to