#!/usr/local/bin/perl -w use strict; $|++; # hit CTRL-C to produce INT $SIG{INT} = sub { print "i can handle INT... $_[0]\n" }; print "hello!\n"; sleep(5); eval { local $SIG{INT} = sub { print "INT, too... $_[0]\n" }; print "hello again!\n"; sleep(5); }; $@ && print "oot! $@"; __END__ # when i press CTRL-C during the sleep() statements, i get: C:\>perl test_diehandler.pl hello! i can handle INT... INT hello again! INT, too... INT