http://www.perlmonks.org?node_id=702901


in reply to Re: Perl progname
in thread Perl progname

/proc/$$/cmdline will reflect $0's modification, e.g.:
$ perl -le '$0="foo"; print qx "cat /proc/$$/cmdline"' foo