delete $ENV{PATH}; # for taint mode open ( CMD, '/tools/usr/local/wbin/ls.exe / 2>res.txt |' ) || die $!; while ( ) { print; } close ( CMD );