# create the user agent we want to use to check the websites my $ua = LWP::UserAgent->new(agent => 'Opera/9.80 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.15 Version/10.00'); $ua->default_header(ACCEPT_LANGUAGE => 'en'); $ua->max_redirect(24); my $req = HTTP::Request->new(GET => $uri); $req->header('Accept' => 'text/html'); my $res = $ua->head( $uri ); return $res->status_line();