I'm not sure what you mean, obviously you want to poll only every 60 seconds.
Personally I'd prefer sleep 60; instead of burning the CPU with an infinite loop.
Your script will wake up in time, and other processes can use the CPU in the meantime.
Now if your problem is that Net::Curl takes too long, measure that time and subtract it sleep 60-$lastcurl;
You'll need Time::HiRes for that kind of accuracy.
use Time::HiRes qw (time sleep );
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: making a loop script with a remote URL call faster
by LanX
in thread making a loop script with a remote URL call faster
by brandonm78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |