如何在Perl中修改$ 0值?

Ana*_*dan -1 perl

我想测试一个Perl脚本.我想在编译期间修改"$ 0"值.那可能吗?

bri*_*foy 8

每当您对特殊变量有疑问时,请阅读perlvar中的条目.这是条目的第一部分,$0前面暗示您可以分配给它:

   $PROGRAM_NAME
   $0      Contains the name of the program being executed.

           On some (read: not all) operating systems assigning to $0
           modifies the argument area that the "ps" program sees.
Run Code Online (Sandbox Code Playgroud)

关于分配给它的各种影响,这个条目一直在继续.

你有一个例子说明你想要做什么以及它没有做你想做的事情吗?