I'd like to use it in a larger script to log STDERR to a file.
You don't need a seperate program for doing that. You can just reopen STDERR to wherever you like:
open(STDERR, '>', '/path/to/logfile') or die "Can't open STDERR to /path/to/logfile: $!\n";
----
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: Open pipe to a function?
by hardburn
in thread Open pipe to a function?
by Sprad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |