• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 418
  • Last Modified:

perl ssl

Hi ,

I have a http site .

Many of my linux daemon using the perl.

I have all the ssl packages .I need a way to use ssl using perl.

Thanks
0
magento
Asked:
magento
  • 2
1 Solution
 
Justin MathewsCommented:
You can use LWP Perl module to do all http and https transfers. See example below. Check LWP documentation for details at:

http://search.cpan.org/~gaas/libwww-perl-5.837/lib/LWP.pm




use LWP;
my $browser = LWP::UserAgent->new;

my $response = $browser->get("https://www.yoururl.com/");

die "$url error: ", $response->status_line
   unless $response->is_success;

print $response->content;

Open in new window

0
 
magentoAuthor Commented:
jmatix,

I understand ,but when i am trying to use https ,i am getting error like (no ssl found in the IO ) please advice.
0
 
Justin MathewsCommented:
SSL connection requires Perl module IO::Socket::SSL. Install that module from CPAN.

http://search.cpan.org/~sullr/IO-Socket-SSL/SSL.pm

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now