in reply to Taint checking with Cwd();

That's your clue right, there, get rid of $ENV{PATH}.
undef %ENV; #or undef $ENV{PATH}; #or $ENV{PATH}='/some/known/value/tainted/no/more';

 
___crazyinsomniac_______________________________________
Disclaimer: Don't blame. It came from inside the void

perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"