use strict; use warnings; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get('https://www.cpan.org'); my $html_string = $mech->content(); print $html_string; ### Can't connect to www.cpan.org:443 at test2.pl line 7.