You could probably do some tricks with IO::Multiplex. Just save the orginal filehandle like this:
my $old_stderr = *STDERR;
And then reopen STDERR with IO::Multiplex with $old_stderr and a filehandle to the log file.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
In reply to Re: Re: Re: Open pipe to a function?
by hardburn
in thread Open pipe to a function?
by Sprad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |