sub open { my $filehandle = shift; # ... some logging happens here ... my $return; $return = CORE::open($filehandle,@_[0..$#_]); return $return; }