develooper Front page | perl.perl5.porters | Postings from June 2020

Re: What am I not grokking about $SIG{__WARN__}?

Thread Previous | Thread Next
Sergey Aleynikov
June 30, 2020 13:54
Re: What am I not grokking about $SIG{__WARN__}?
Message ID:
вт, 30 июн. 2020 г. в 16:38, James E Keenan <>:
> BEGIN { local $SIG{__WARN__} = sub { $thiswarn = $_[0]; }; }

LeoNerd answered about the 'local' behaviour here, but if you really
need it - you can put a second BEGIN block at the end of the file,
clearing/restoring __WARN__ handler.

Best regards,
Sergey Aleynikov

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About