The man page for perlvar says:
The emphasis being on someOn some operating systems assigning to "$0" modifies the argument area that the ps program sees.
Printing $0 in your program means nothing. That's the value that your program sees. If, as a side effect, the value ps sees is also modified, you can bet that Perl isn't querying that ps value to show you what it has in $0.
In reply to Re^2: (perlvar) changing program name
by steves
in thread (perlvar) changing program name
by slipwalker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |