Re: Timer in perl

2011-05-30 Thread Uri Guttman
> "SS" == Sooraj S writes: SS> Hi, SS> Could any one tell me what is wrong with my code? It does not time out SS> after 5 seconds which is what i need. It remains in the infinit loop. SS> while (1) { }; your bug is here. you never exit the loop. SS> eval SS> { SS> alarm

Timer in perl

2011-05-30 Thread Sooraj S
Hi, Could any one tell me what is wrong with my code? It does not time out after 5 seconds which is what i need. It remains in the infinit loop. #! /usr/bin/perl use strict; use warnings; sub comeOut; $SIG{ALRM} = \&comeOut; while (1) { }; eval { alarm 5; #timeout is 60 } sub comeOut

Re: Event Timer in Perl

2006-05-22 Thread Stephen Kratzer
On Saturday 20 May 2006 23:13, SkyBlueshoes wrote: > I have a script that uses an infinite loop, I'm wanting to be able to > set a timer that when expired will run a subroutine, something sort of > like Poe's callback timer feature. How would I go about doing this? I > need to be able to set multip

Re: Event Timer in Perl

2006-05-20 Thread Jeff Pang
>I have a script that uses an infinite loop, I'm wanting to be able to >set a timer that when expired will run a subroutine, something sort of >like Poe's callback timer feature. How would I go about doing this? I >need to be able to set multiple timers on the fly within my script and >have th

Event Timer in Perl

2006-05-20 Thread SkyBlueshoes
I have a script that uses an infinite loop, I'm wanting to be able to set a timer that when expired will run a subroutine, something sort of like Poe's callback timer feature. How would I go about doing this? I need to be able to set multiple timers on the fly within my script and have them onl

RE: Timer in Perl??

2004-06-24 Thread Bob Showalter
William Martell wrote: > Hello Group, > > Could anyone please tell me if there is a timer function in Perl. I > am trying to get some perl code to run every morning, but I am unsure > how to do it. What platform? On Unix, you typically use cron to run jobs at scheduled times. Windows has a sched

Re: Timer in Perl??

2004-06-24 Thread Wiggins d Anconia
> Hello Group, > > Could anyone please tell me if there is a timer function in Perl. I am trying to get some perl code to run every morning, but I am unsure how to do it. > > Thanks > Will > Generally this is provided by the underlying system's scheduler. cron on *nix, something else on windo

Re: Timer in Perl??

2004-06-24 Thread James Edward Gray II
On Jun 24, 2004, at 9:33 AM, William Martell wrote: Hello Group, Could anyone please tell me if there is a timer function in Perl. I am trying to get some perl code to run every morning, but I am unsure how to do it. You could always sleep() for a day between runs, but that seems far too clumsy

Timer in Perl??

2004-06-24 Thread William Martell
Hello Group, Could anyone please tell me if there is a timer function in Perl. I am trying to get some perl code to run every morning, but I am unsure how to do it. Thanks Will -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]