- or download this
*{main::open} = sub { print "Ho\n"; };
- or download this
my $glob_ref = do { no strict 'refs'; \*{'main::open'} };
*$glob_ref = sub { print "Ho\n"; };
- or download this
BEGIN {
# Deleting and remaking the sub fails! ;(
...
*{main::open} = sub { print "Ho\n"; };
use subs 'open';
}
- or download this
BEGIN {
# Deleting and remaking the sub fails! ;(
...
import subs 'open';
}
}
- or download this
use strict;
use warnings;
...
}
open(my $fh5, '<', $0); # Calls CORE::open