http://qs321.pair.com?node_id=313886


in reply to Open pipe to a function?

If you are going to pipe it to a script, then I believe it has to be in another script.

If all you need to do is write STDERR to a file, why not just do this at the beginning of your script:
open(STDERR, '>error.txt');
Update:Try using IO::Tee, like suggested by Roy Johnson. I included a sample in my reply to you below.

- Tom