I can't guarantee the robustness of this solution, but trying opening STDERR for writing:
use strict; use warnings; open STDERR, "> somefile.txt" or die $!; die "We're dead!";
This works for me, but no guarantees as I've never tried to redirect STDERR.
Cheers,
Ovid
Vote for paco!
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to (Ovid) Re: Catching STDERR
by Ovid
in thread Catching STDERR
by kiseok7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |