in reply to In what OS and Perl version set $0 works?

Does not work on Solaris 2.8, perl, version 5.005_03 built for sun4-solaris, neither started as perl -w tmp.pl nor as ./tmp.pl. This may be due to a kernel setting that (dis)allows setting of $0...

I modified the snippet so I can find the PID more easy for grepping:

#!/usr/bin/perl -w $|=1 ; print "$$: $0\n" ; $0 = 'SET_0_WORKS' ; print "$0\n" ; for(0..1000) { sleep(1); print ".\n" ; }

Under Windows NT with Perl 5.6.1, it dosen't work, as demerphq already found out.