use LWP::UserAgent; use LWP; $ident = "The Server"; # this gets logged $timeout = 5; # in seconds $ua = new LWP::UserAgent; # call the constructor $ua->agent($ident); # set the id $ua->timeout($timeout); # timeout my $req = new HTTP::Request GET => 'http://site.com';