apparently the local was messing it up.open SAVE_OUT, '>&STDOUT'; pipe READOUT, WRITE; open STDOUT, '>&WRITE'; close WRITE; @result = &$code(); close STDOUT; my @stdout = <READOUT>; open STDOUT, '>&SAVE_OUT';
In reply to self answer (was: Re: redirecting STDOUT (of a system call) to a var)
by Anonymous Monk
in thread redirecting STDOUT (of a system call) to a var
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |