dk has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I cannot figure out how to override close() properly. If I do it as
use strict; use warnings; BEGIN { *CORE::GLOBAL::close = sub { 1 }; }; close STDIN;
then I get the bareword "STDIN" not allowed error. Sure I can call it as close \*STDIN but that beats the purpose of the override itself.
Any ideas? Thanks!
Update: solved, ikegami++!
Back to
Seekers of Perl Wisdom