in reply to Passing filehandles to subroutines

Besides IO::File which probably has other advantages, you can also pass globs by prefixing the name with *. Eg.

sub myprint { my $fh = shift; print $fh $_[0]; } ... open OUT, '>', 'junk' or die $!; myprint *OUT, 'test'; close OUT; c:\test>type junk test c:\test>

Examine what is said, not who speaks.

The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.