in reply to Re^3: Perl Script own path
in thread Perl Script own path

__FILE__

Replies are listed 'Best First'.
Re^5: Perl Script own path
by Marshall (Canon) on Jul 27, 2011 at 08:20 UTC
    Nice thought. But unfortunately falls short. __FILE__ is $0 on my Fedora Linux box.
    [marsh b]$ cat ../test/filetest #!/usr/bin/perl -w use strict; print "dollar zero is: $0\n"; my $f = __FILE__; print "__FILE__ is: $f\n"; [marsh b]$ ../test/filetest dollar zero is: ../test/filetest __FILE__ is: ../test/filetest