http://www.perlmonks.org?node_id=24485


in reply to What is the best way to run periodic tasks (once per minute)?

Corion is correct. A modification that I have had to make on several occasions allows for more time intensive tasks is this:

while (1) { $waketime = time + $sleep_duration; &do_complex_things; sleep($waketime-time); }


Something else that you might want to look into is the Time::HiRes module.