This is a discussion on [mp2] [bug?] %ENV changes not propagated to qx() and to C-library calls. - modperl ; Looks like mod_perl scripts execute the line that changes $ENV{PATH},
but when a qx() back-tick command is executed, that command is executed
under the value of the original path.
The docs seem to suggest that that changes to %ENV should ...

[mp2] [bug?] %ENV changes not propagated to qx() and to C-library calls.

Looks like mod_perl scripts execute the line that changes $ENV{PATH},
but when a qx() back-tick command is executed, that command is executed
under the value of the original path.

The docs seem to suggest that that changes to %ENV should work fine:http://perl.apache.org/docs/2.0/user/coding/coding.html
>mod_perl passes (exports) the following shell environment variables
(if they are set) :
> * PATH - Executables search path.
> * TZ - Time Zone.
>Any of these environment variables can be accessed via %ENV

Maybe the docs need to be changed to say that while mod_perl passes these
values to the script, it does not pass them on to any qx() executions.
Would be best if mod_perl code can be fixed to allow this, though.

------ Testing command 'basename', path /invalid/dir:
[Wed Jan 16 17:13:39 2008] script.pl: Can't exec "basename": No such
file or directory at /home/cgi/script.pl line 12.
failed to execute 'basename', $? is -1/16777215 : No such file or directory
output $string is:
-------------------------------------------------------
But when I run this under Apache and mod_perl, I get this output -
/bin is still in the PATH even after removal:
------ Testing command 'basename', path /bin:
output $string is: testing