while (1) { my $url = "http://kronometrix.org/"; $http->setopt(CURLOPT_URL, $url); my $retcode = $http->perform(); ## Get the results my $response = $http->getinfo(CURLINFO_HTTP_CODE); if ($retcode == 0) { print "Ok, Status: $response\n"; } else { print "Error, Status: $response\n"; } ### Check for end last if ++$loop == $loop_max; ### Interval pause; } #### while (1) { my $url = "http://kronometrix.org/"; $http->setopt(CURLOPT_URL, $url); my $retcode = $http->perform(); ## Get the results my $response = $http->getinfo(CURLINFO_HTTP_CODE); if ($retcode == 0) { print "Ok, Status: $response\n"; } else { print "Error, Status: $response\n"; } ### Check for end last if ++$loop == $loop_max; ### Interval sleep; }