hello, i'm trying this "proof of concept" script, to make sure i can modify the output of a ps for a given perl script, as stated on perlvar manpage.
If you're aiming for any sort of portability across operating systems -- or even different versions of the same operating system -- you should keep in mind that not all systems support modifying this value. Any halfway secure operating system won't let you.
But what if I want to hide what I'm running from other people? Not being able to change $^X is insecure!
Reconsider the ethical standpoint of what you're doing, or install a decent operating system (or OS interface) which allows you to hide your processes from other users (except, optionally, the super-user(s) or a select group of administrators).