open(CMD, "($cmd | sed 's/^/STDOUT:/') 2>&1 |"); print " test\n" if $DEBUG; while (<CMD>) { if (!s/^STDOUT://) { print " Command failed: ", $_; exit 2; } else { chomp; @argTest = split; } }
In reply to Re: Re: Reading from STDOUT after Redirecting it.
by ccarden
in thread Reading from STDOUT after Redirecting it.
by Dru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |