in reply to Passing filehandles to subroutines
my $handle = new IO::File "> $outfile"; print_stuff_to($handle); sub print_stuff_to { my $fh = shift; print $fh "Foo Bar"; } [download]