in reply to Strange SIGNAL HANDLER behavior...
Note that Perl already passes in the name of the signal to the signal handler so simply: $SIG{QUIT}= \&GotSignal; would produce the message Got a QUIT signal, exiting so if the case of the name bothers you, another alternative would be:
- tye (but my friends call me "Tye")sub GotSignal { my $sig= ucfirst lc shift; print "Got a $sig signal, exiting\n"; exit(0); }
|
|---|