#!/usr/bin/perl my $interrupted; local $SIG{INT} = sub { $interupted = 1 }; while (1) { print "hi\n"; sleep 1; if ($interrupted) { warn "ctrl-c pressed!\n" and $interrupted = 0 } }
In reply to Re: disable ctrl+c in my program
by zentara
in thread disable ctrl+c in my program
by patrix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |