my pricing = 0; my $time = 0; while (1) { if (time() >= ($time + 60)) # updates the pricing on initial run and every 60 seconds. { Net::Curl to remote URL... request here. $pricing = [from net::curl] $time = time(); } ... continue on with my perl code (needs the $pricing variable to work) }