in reply to Setting signal handlers
That's the POSIX way to do things. It's as ugly in Perl as it's in C, since in C it's also done a la POSIX. Fortunately in Perl we have Another Way To Do It:
sub interrupt { print "quitting!\n"; } $SIG{'INT'} = 'interrupt'; sleep 20; __END__ ^C quitting!
--
David Serrano
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Setting signal handlers
by andyford (Curate) on May 09, 2006 at 21:17 UTC | |
by Hue-Bond (Priest) on May 09, 2006 at 21:48 UTC | |
by ruoso (Curate) on May 09, 2006 at 21:52 UTC | |
by dave_the_m (Monsignor) on May 09, 2006 at 22:01 UTC | |
by ruoso (Curate) on May 09, 2006 at 23:18 UTC | |
by dave_the_m (Monsignor) on May 10, 2006 at 00:17 UTC | |
|