in reply to Use of uninitialized value in open second time but not first.
Would not it be easier to open() the scalar and select() the handle?
Unless the code whose output you need to capture specificaly prints to STDOUT, this should work as well.open my $FH, '>', \$output; my $old_FH = select($FH); print "Hello world\n"; select($old_FH);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Use of uninitialized value in open second time but not first.
by kyle (Abbot) on Mar 31, 2007 at 00:46 UTC |