in reply to Re: quiting program
in thread quiting program

your code is probably better implemented as a closure. then there's no special variable in the same scope as your code.

{ my $num_ctrlc = 0; $SIG{'INT'} = sub { print "Got " . ++$num_ctrlc . " ctrl-c\n"; exit if $num_ctrlc > 2; } }

~Particle *accelerates*