summaryrefslogtreecommitdiff
path: root/sample/trap.pl
blob: ce022d4062105501cb1fbc0e83fb39ccd4d4155f (plain)
1
2
3
4
5
6
$SIG{'INT'} = 'test';

while (<>) {
  print;
}
sub test { print "C-c handled\n"; }