in reply to Help to infinite loop

Schedule::Cron might also be a good hammer for this nail.
use Schedule::Cron; # Create a Cron object and assign a coderef to it my $cron = new Schedule::Cron( \&check_website ); # Establish the time interval between runs. # This follows the standard cron notation. $cron->add_entry("* * * * *"); # Run cron job. $cron->run(); sub check_website { warn "Checking website...\n"; # code }