|No such thing as a small change|
Find the full path of the script at run timeby ibanix (Hermit)
|on Mar 12, 2003 at 23:11 UTC||Need Help??|
ibanix has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow monks!
How would I find the full path to a script at the time it is invoked? eg, if the script is /home/foo/script.pl, return all of that.
I need this to work on Win32 also. I'm about to go dive into perlvar and see if I can find a built-in that does this, but I thought I'd ask my wise masters first. :-)
$ echo '$0 & $0 &' > foo; chmod a+x foo; foo;