# ./prompt2
Testing One Two Three
^CPress -=ENTER=- to Resume or 'q' to quit
<ENTER * 3 times>
Got to the end of the programme
#!/usr/bin/perl $SIG{'INT'} = sub { print "Press -=ENTER=- to Resume or 'q' to quit\n"; chomp (my $quit=<STDIN>); die "\nTerminating at users request \n" if $quit =~ /^q$/i; }; print "Testing One Two Three\n"; chomp (my $continue=<STDIN>); print "Got to the end of the programme \n";
janitored by ybiC: Balanced <code> tags around codeblock, other minor format tweaks for legibility
In reply to Resuming from a SIG{INT} by jmccaf01
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |