Hi this is my first time posting. I was wondering if there was a way to do something based on the LWP timeout function. For example:
foreach (@url){
chomp;
$site = "$_";
$time = time();
$ua->timeout(30);
$request = new HTTP::Request POST => $site;
$response = $ua->request($request);
$return_code = $response->code([$code]);
&check_status($site, $return_code, $time);
}
I want to do something when the request times out. Sort of like:
if ($ua->timeout(30)){
Write to log
}
is this possible? with the timeout function? Thanks in advance.