in reply to Re^4: Localizing %SIG
in thread Localizing %SIG

Okay, so the result for "five" isn't correct... looks like there really may be a bug somewhere.

This is a bug. The result for "five" should be "inner 1: five". The code reference is still in place, but the warn vector seems to be clobbered by the aliasing of %SIG inside the scope of the previous block. Commenting out the local %SIG; line makes the line warn "five\n"; work as expected.

Update: I filed a bug report. Thanks, Anonymous Monk.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Replies are listed 'Best First'.
Re^6: Localizing %SIG
by Anonymous Monk on Feb 18, 2016 at 08:25 UTC

    Thank you! BTW, delete local $SIG{...} appears to be similarly broken.