The problem is that the process name and /proc/PID/environ are actually windows into the address space of the process. The pointers that determine these windows are in the kernel and the program cannot update them, but you can change the data stored in the region they point to.
Does changing $0 destroy %ENV or does perl copy the environment out of the way before reusing the original environment block?
In reply to Re: Setting $0 clears /proc/PID/environ too
by jcb
in thread Setting $0 clears /proc/PID/environ too
by kikuchiyo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |