Hello!
I was wondering if anyone knows/has had experience with using sleep() in a
conditional context. For example...
for ($x=0; $x<= 10; $x++) {
print "$x\n";
# if x is equal to 5, sleep for 5 seconds
if ($x == 5) { sleep(5); }
}
What I wanted to accomplish with this loop was to have the iteration run
until the condition was met, at which point the loop would sleep for 5
seconds. Is there a way I can accomplish this? When I run the code, above,
what actually happens is the entire script/code waits for 5 seconds and
*then* launches the loop.
Any advice or direction would be super.
Thanks!
Todd
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs