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