The %SIG array contains values only for signals set within the Perl script.
#!/usr/bin/perl
sub handler{
local($sig) = @_; # First argument is signal name
print "Caught SIG$sig -- shutting down\n";
exit(0);
}
$SIG{'INT'} = 'handler'; # Catch <Ctrl>-c
print "Here I am!\n";
sleep(10);
$SIG{'INT'}='DEFAULT';
$SIG{'INT'}='IGNORE';