Perl: the Markov chain saw | |
PerlMonks |
Re: Finding out how you were called...by rchiav (Deacon) |
on Aug 06, 2001 at 23:41 UTC ( [id://102572]=note: print w/replies, xml ) | Need Help?? |
$0 stores the name that the program was run as.. Either I completely misread the question or you added the bit about $0 after I wrote this :) $0 (for me, on RH 7.1) contains the full path even if the script is in the path. The only time it doesn't is if I specify a relative path from the command line. An option could be to check, if it doesn't match the full path, if $0 and the pwd eq what you're looking for. Rich
In Section
Seekers of Perl Wisdom
|
|