- or download this
BEGIN {
*CORE::GLOBAL::open = sub (*;$$) { return undef };
}
open(my $fh, '>', 'f.tmp') or die "error: open";
print $fh "hello\n" or die "error: print";
- or download this
BEGIN {
*CORE::GLOBAL::print = sub (*;@) { return undef };
}
open(my $fh, '>', 'f.tmp') or die "error: open";
print $fh "hello\n" or die "error: print";