iprint " MAC: $mac : Contacting API......\n" if $debug > 1; # Wrap call to API with eval eval { local $SIG{ALRM} = sub { iprint "Network Delay) alarm ( $maxNetworkDelay) ; $ua = LWP::UserAgent->new( timeout => $maxNetworkDelay); $response = $ua->request( HTTP::Request->new(GET => $AuthURLforMAC.$mac)); $respcon = $response->content; alarm(0); }; iprint " MAC: $mac $@" if $@;