crenz has asked for the wisdom of the Perl Monks concerning the following question:
This sounds like a trivial question, but somehow I can't find the answer. I'd like to be able to find out the location of the script file that is being executed by perl. $0 won't do, because it doesn't contain the path. Cwd won't do, because on Mac OS X, the operating system sets the current working directory to /.
Can anyone help me out?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Finding out name and path of script file
by Fletch (Bishop) on May 26, 2004 at 23:36 UTC | |
by tye (Sage) on May 27, 2004 at 00:11 UTC | |
by crenz (Priest) on May 27, 2004 at 00:01 UTC |