in reply to Passing filehandles to subroutines

I think IO::File is the best way to go, but there is another way if you really don't want to change your "OUT" style filehandles in the main code. You can pass references to typeglobs into subroutines, like this:
print_some_stuff(\*OUT); sub print_some_stuff { my $fh = shift; print $fh "stuff\n"; }