in reply to how do i redirect STDOUT, STDIN, or STDERR to a FILE?

This works for me (I haven't tried it on Windoze, but I wouldn't expect that to make a difference):
open( STDERR, ">", $stderrFileName );
and likewise for STDOUT. For STDIN, you would replace ">" with "<".

Originally posted as a Categorized Answer.