use strict; use diagnostics; sub myprint { my( $fh, $text ) = @_; print $fh $text; } myprint( STDOUT, "Hello world!\n" );