I was working on some Perl code that does signal handling and I came across this one liner and wasn't sure what it was doing.
local $SIG{__DIE__} = sub {$! = 2; die $_[0];};
I think the first part of the anonymous subroutine is setting $! to 2, but I am not sure what the second part is doing. Can someone explain this to me.
Thanks