$SIG{INT} = sub { print "You zapped me!\n"; }; print "Try to zap me with ^C, I dare you!\n"; sleep 5; # normally warnings are not fatal warn "This is your last warning\n"; # make warnings fatal $SIG{__WARN__} = sub { print "Died fron the warning @_\n"; exit }; # now warnings will be fatal warn "I warned you!"; print "You will never read this, because the last warning killed me!";
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: signal handling
by tachyon
in thread signal handling
by Seshouan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |