in reply to Disable Control +C
This works for me (ActiveState Perl 5.14 on WIndows 7):
use 5.010; $SIG{INT} = 'IGNORE'; my $x = 1; while ( $x <= 5 ) { say $x++; sleep 1; }
When I say 'works', I mean that Ctrl-C is disabled until until the programme ends (try it).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Disable Control +C
by PilotinControl (Pilgrim) on Mar 12, 2013 at 20:29 UTC | |
by Athanasius (Archbishop) on Mar 13, 2013 at 02:30 UTC | |
by PilotinControl (Pilgrim) on Mar 13, 2013 at 07:13 UTC |