On 2012-07-21 14:50, punit jain wrote:
I have a requirement where I need to run my perl script for x hours
You can let the ALRM-sub simply set a global variable, like $STOP.
Your process should check this before starting a next iteration.
Beware that each child needs its own alarm. The parent won't need one.
for my $step ( @steps ) {
last if $STOP;
...;
}
--
Ruud
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
