http://qs1969.pair.com?node_id=782606

Ankit.11nov has asked for the wisdom of the Perl Monks concerning the following question:

Accessing web page and storing it in a File on local PC.
use strict; use warnings; use WWW::Mechanize; my $mech=WWW::Mechanize->new(); my $URL="http://in.yahoo.com/"; $mech->get($URL); my $file=$mech->content(); open FILE_OUT , ">output.html" or die "$!"; print FILE_OUT $file; close FILE_OUT;
The above code is working fine when I am trying to access any HTTP link.
But if I am replacing the $URL variable(Line 5) with any HTTPS link(eg:https://login.yahoo.com/config/mail?.intl=in) it is giving the below error.

Error GETing https://login.yahoo.com/config/mail?.intl=in: Can't connect to logi n.yahoo.com:443 (Bad hostname 'login.yahoo.com') at mech.pl line 8