#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new(); $ua->ssl_opts(verify_hostname => 1); $ua->ssl_opts(SSL_ca_file => './MozillaCAFile.crt'); my $host = 'https://tlstest.paypal.com'; my $req = HTTP::Request->new(GET => "$host"); my $res = $ua->get($host); if (not $res->is_success) { print $res->as_string . "\n"; } else { print "Success\n"; print $res->decoded_content; }