In Perl, how do I make an END subroutine test if Perl has died?
This code works fine and prints “RUNS”:
sub END {print "RUNS\n"}
die "TESTING";
What variable do I check to see if the script ended normally or died?
I know about %SIG, but surely there’s an easier answer here?
Test
$?: