use LWP::UserAgent;
use strict;
use warnings;
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(GET => 'https://www.easysoft.com');
my $res = $ua->request($req);
print $res->headers_as_string;
print $res->content;
####
Connection: close
Date: Thu, 16 Jun 2011 14:22:46 GMT
Accept-Ranges: bytes
Server: Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7d mod_perl/1.999.21 Perl/v5.8.6
Vary: Accept-Encoding
Content-Type: text/html; charset=ISO-8859-1
Client-Date: Thu, 16 Jun 2011 14:22:22 GMT
Client-Peer: 172.20.100.10:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
Client-SSL-Cert-Subject: /serialNumber=Paoxfx3blSdh6U20B0CULwa1WF0wpCXi/C=GB/O=www.easysoft.com/OU=GT68879435/OU=See www.rapidssl.com/resources/cps (c)10/OU=Domain Control Validated - RapidSSL(R)/CN=www.easysoft.com
Client-SSL-Cipher: DHE-RSA-AES256-SHA
Client-SSL-Warning: Peer certificate not verified
Client-Transfer-Encoding: chunked
Content-Style-Type: text/css
####
Content-Type: text/plain
Client-Date: Thu, 16 Jun 2011 14:26:04 GMT
Client-Warning: Internal response
Can't connect to www.easysoft.com:443
####
Content-Type: text/plain
Client-Date: Thu, 16 Jun 2011 14:26:52 GMT
Client-Warning: Internal response
Can't connect to www.easysoft.com:443 (certificate verify failed)
LWP::Protocol::https::Socket: SSL connect attempt failed with unknown errorerror:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed at /home/martin/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/LWP/Protocol/http.pm line 51.