Help for this page

Select Code to Download


  1. or download this
    $SIG{INT} = sub {
        # handle the interrupt
    }
    
  2. or download this
    my $count = 0;
    $SIG{INT} = sub { 
        print "\nCaught an interrupt\n"; 
    ...
    
    $|++;
    while (1) {print '.'; sleep 1}