The stupid question is the question not asked | |
PerlMonks |
Re: Do-nothing loopsby tmiklas (Hermit) |
on Mar 16, 2002 at 12:35 UTC ( [id://152180]=note: print w/replies, xml ) | Need Help?? |
Hi! If you want to wait a few seconds before taking an action, use the sleep(), becouse loops like yours strongly occupy your machine. sleep() works great with full number of seconds, but if you need delays below 1 sec or for example 1.7 sec, then use Time::HiRes module from CPAN. It works fine and should fit well :-) BTW. CPAN has a nice search engine... Good luck!
In Section
Seekers of Perl Wisdom
|
|