sub printSumpn{ local($handle, file) = ('RPT', '/tmp/report.txt'); myOpen($handle, $file); print $handle "hello world\n"; close($handle)} sub myOpen{ local($handle, $file) =@_; # ...do some logging and sanity checking... open($handle, ">$file")} #### my $handle = *RPT;