use strict; use warnings; { package mmm; sub fopen { CORE::open $_[0], $_[1]; } sub fclose { CORE::close $_[0]; } } mmm::fopen(my $fh, ">test"); print $fh "Foo, bar.\n"; mmm::fclose($fh);