You are viewing the version of this documentation from Perl 5.005_03. View the latest version
$PROGRAM_NAME
$0

Contains the name of the file containing the Perl script being executed. On some operating systems assigning to "$0" modifies the argument area that the ps(1) program sees. This is more useful as a way of indicating the current program state than it is for hiding the program you're running. (Mnemonic: same as sh and ksh.)