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>