Just another Perl shrine | |
PerlMonks |
Re: lexical variables and signal handlersby Lachesis (Friar) |
on May 27, 2003 at 14:52 UTC ( [id://261004]=note: print w/replies, xml ) | Need Help?? |
If you want to trigger from the alarm, you'll want to use $SIG{ALRM} rather than INT.
You don't have to put $var global it just needs to be in the same scope as the signal handler
so you could have
That said I assume that you want to a bit more than just trigger an alarm so it might help if you could give it bit more context
In Section
Seekers of Perl Wisdom
|
|