in reply to STDOUT, STDERR sniffer
You reopen each handle to do what you want, for instance in 5.8 you can easily capture to variables,
If you prefer, you can open to disk files instead in any version of perl. To capture to variables in earlier versions of perl, you must use IO::Scalar or similar.my ($output, $messages); { open local(*STDOUT), '>', \$output or die $!; open local(*STDERR), '>', \$messages or die $!; # ... }
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: STDOUT, STDERR sniffer
by Anonymous Monk on Jul 21, 2004 at 14:59 UTC |