Created
March 31, 2014 15:58
-
-
Save andrewrjones/9895581 to your computer and use it in GitHub Desktop.
keep doing something until we catch an INT signal (Ctrl + C)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
# keep doing something until we catch an INT signal (Ctrl + C) | |
use strict; | |
use warnings; | |
my $running = 1; | |
$SIG{INT} = sub { $running = 0 }; | |
while($running){ | |
# ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment