use strict; use warnings; use LWP::UserAgent; my $address = "https://companyDomain/subpage"; # Start useragent and get the webpage my $ua = new LWP::UserAgent; my $head_request = new HTTP::Request GET => $address; my $head_response = $ua->request( $head_request ); # Evaluate result if ($head_response->is_success){ print " is valid\n"; } else { print ": is invalid\n"; }