$MyRequest = HTTP::Request->new('GET',"$URL"); alarm 30; $MyResponse = $UserAgent->request($MyRequest); my $timeleft = alarm 0;