in reply to redirect STDOUT from system() function
With no PATH you have to explicitly give the entire path to system calls and so forth, but you're doing that anyway.$ENV{PATH}=''; $ENV{IFS}='';
Now I can suggest the way I normally play with STDOUT:
open LS, qq(/bin/ls -al|) || die qq(cannot execute /bin/ls: $!); while (<LS>) { # Do whatever you want to do with STDOUT from # the ls call here } close LS;
This is basically straight out of perlipc.
|
|---|