in reply to Re: Where is the interpreter
in thread Where is the interpreter

That was going to be my original answer, until I continued reading that section in perlvar and saw this text:
Because many operating systems permit anyone with read access to the Perl program file to make a copy of it, patch the copy, and then execute the copy, the security-conscious Perl programmer should take care to invoke the installed copy of perl, not the copy referenced by $^X.

---
It's all fine and dandy until someone has to look at the code.

Replies are listed 'Best First'.
Re^3: Where is the interpreter
by ikegami (Patriarch) on Jan 08, 2007 at 16:52 UTC

    The warning makes no sense in that situation. It tells you to use a copy of Perl that's known to be safe instead of relying on $^X, while the OP's problem is that he doesn't know where his Perl is located.

    The warning applies to the method used in your solution too. In fact, it applies to all answers to the OP's question other than those that match the pattern "I talked to your service provider and they told me to use the Perl located in XXX."

    Furthermore, if the OP made a copy, he probably wants to use that copy (especially if he patched it).

    The usual case for using $^X is to spawn a subprocess. The warning applies to launching child processes from setuid scripts (or code that might find its way into one).