in reply to Signal Handling and alarm()
The general solution to this is to use POE, or in particular POE::Component::Client::UserAgent.
That might sound like a formidable thing to want to do, but I've had success in the past doing this without completely re-engineering the program - just turning each turn of the "event loop" you'll have written in your program into its own little POE session.
$h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Signal Handling and alarm()
by gnork (Scribe) on Jun 17, 2005 at 10:46 UTC |