open( FH, ") { ... } close FH; #### my $fh = myOpen( "<", "some/path.name" ); while (<$fh>) { ... } close $fh;