#!/usr/local/bin/perl use strict; use warnings; use LWP::UserAgent; use URI; my $ua = LWP::UserAgent->new; my $uri = URI->new('https://www.google.com'); my $res = $ua->get($uri); unless ($res->is_success) { die; } if ($res->content_type ne 'text/html') { die; } print "GOOGLE\n"; print $res->decoded_content; __END__