my $stop = 0; $SIG{'INT'} = sub { $stop = 1 }; #### print "->CQ username: "; while (){ if ($stop == 1){ return(0); } last; } chomp ($username = );