in reply to just another taint question

The backticks `` are the old way, the new way to write it is qx//. And taint mode complains because you did not set $ENV{PATH} before trying to launch a program - and qx looks at $ENV{PATH}.

You should be able to make this work by adding the following line to your script:

$ENV{PATH} = '/usr/bin:/bin'; # or maybe even: $ENV{PATH} = '';

Replies are listed 'Best First'.
Re^2: just another taint question
by isotope (Deacon) on Mar 31, 2005 at 21:27 UTC
    taint mode complains because you did not set $ENV{PATH}
    No, it's complaining because $server is tainted.


    --isotope
Re^2: just another taint question
by tcf03 (Deacon) on Mar 31, 2005 at 19:11 UTC
    I probably should have added what I have already tried. I do have the following code at the top of my script.
    $ENV{'PATH'} = '/bin:/usr/bin'; delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};