Hi all, I noticed "local %SIG = (%SIG, PIPE => sub { ... })" wasn't restoring the old PIPE handler as I expected when I left that scope, but "local $SIG{PIPE} = sub { ... }" restores the old handler fine. I've relied on a similar thing "local %ENV = (%ENV, k => $v)" for ages, so is this anomaly for %SIG documented/expected? Example here: ----------8<--------- use strict; use warnings; use Data::Dumper; $Data::Dumper::Deparse = 1; # this works as expected print 'outside before ', Dumper($SIG{PIPE}); { local $SIG{PIPE} = sub { print "SIGPIPE\n" }; print 'inside #1', Dumper($SIG{PIPE}); } print 'outside middle expect and is undef', Dumper($SIG{PIPE}); # this does not work as expected { local %SIG = (%SIG, PIPE => sub { print "SIGPIPE\n" }); print 'inside #2 is sub', Dumper($SIG{PIPE}); } print 'outside after expect undef, is sub?: ', Dumper($SIG{PIPE}); kill 'PIPE', $$; select undef, undef, undef, 0.1; # wait for SIGPIPE to hit # "SIGPIPE\n" printed, why? ----------8<--------- Thanks for any answer you can provide. Perl 5.32.0 on FreeBSD 11.x, but happens on 5.28.1 on Debian 10, tooThread Next