in reply to how to sleep-awake on perl script?
Usually I do this by having my code into a loop, check for an event and terminate the loop if wanted to. Maybe someone has better way. I am looking forward to a reply too !
This should work through SSH too !
$flag=1; while($flag) { $sleep=checkEvent(); if(not $sleep) { --- do events $flag=0; } else { #whatever time you want to delay before checking again ! sleep(2); } }
Vishy
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: how to sleep-awake on perl script?
by Anonymous Monk on Apr 24, 2009 at 00:44 UTC | |
by edatawiz (Novice) on Apr 24, 2009 at 04:44 UTC | |
by Anonymous Monk on Apr 26, 2009 at 20:20 UTC |
In Section
Seekers of Perl Wisdom