in reply to Re: (perlvar) changing program name
in thread (perlvar) changing program name

The man page for perlvar says:

On some operating systems assigning to "$0" modifies the argument area that the ps program sees.
The emphasis being on some

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.

Replies are listed 'Best First'.
Re^3: (perlvar) changing program name
by slipwalker (Acolyte) on Sep 11, 2004 at 22:43 UTC
    i /do/ realize this, that's exactly why i've pointed out which Operating System i'm running ( Linux, kernel 2.4.21, distro Slackware ). I don't aim any portability at all, just a script that should be able to inform it's current state on the "ps" output of a linux machine.