http://qs321.pair.com?node_id=291305


in reply to Best Way to Redirect STDERR to a Scalar

I know you are using Perl 5.6.1 but if you were using Perl 5.8...

perldoc -f open #(snip) File handles can be opened to "in memory" files held in Perl scalars via: open($fh, '>', \$variable) or die "$!"; Though if you try to re-open "STDOUT" or "STDERR" as an "in memory" file, you have to close it first: close STDOUT; open STDOUT, '>', \$variable or die "Can't open STDOUT: $!";


email: mandog