Ever tried redirecting a child stdin or stdout with open()?
open( HANDLE, "ls -l |" ) or die "Unable to exec 'ls'\n";
while( <HANDLE> ) {
#Process each line of output '$_'
}
close( HANDLE );
I do this all the time when I want to execute a child process and evaluate it's output.
HTH,
James
In reply to Re: Testing Input and Output
by jcleland
in thread Testing Input and Output
by jaldhar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |