my pricing = 0; my $time = 0; while (1) { if (time() >= ($time + 60)) { # updates the pricing ... $time = time(); # start interval # ... Net::Curl to remote URL... request here. $pricing = [from net::curl]; } # ... continue on with my perl code # even with old pricing }