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