svenXY has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
while trying to change the name of a perl process (see $0), I just stumbled over the following:
#!/usr/bin/perl my $myself = 'svenXYtest'; $0 = $myself; # change my name sleep 60; # to actually have time to look at ps'es output
While this works fine on Linux (process is renamed to 'svenXYtest'), it does not seem to work on Solaris (process is - here - still named 'perl test.pl'). Is this a known limitation or do I do something wrong here? The docs just state that this works on some, not other OSes.
Thanks in advance,
svenXY

Replies are listed 'Best First'.
Re: Renaming $0 - no effect on Solaris?
by svenXY (Deacon) on Jun 03, 2008 at 10:13 UTC