in reply to Redirecting STDOUT to a variable via eval?
UPDATEuse IO::Scalar; sub var_eval { local *FH; my $fh; tie (*FH, 'IO::Scalar', \$fh); $saved = select FH; eval shift; select $saved; $fh; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 1: Redirecting STDOUT to a variable via eval?
by mr.nick (Chaplain) on Feb 12, 2001 at 09:51 UTC | |
by tilly (Archbishop) on Feb 12, 2001 at 10:20 UTC |