Getting https pages with Perl

Perl’s LWP package is a great way to get web pages and display the content of the resulting http header. Out of the box it does not support https, the following describes how to configure perl to access https pages.

Configure CPAN

The first thing to do is to setup perl to manage modules using CPAN. As root run:

perl -MCPAN -e shell \;

run through the configuration if you haven’t done so.

Install LWP

Inside the CPAN shell run:

install LWP
This will install all then necessary modules for accessing websites. Make sure you select y for GET, POST and HEAD, these are great scripts for getting at web page information from the command line.

Install OpenSSL

If you don’t have openssl-devel installed on your system you will need to install it. Check using:

rpm -q openssl-devel

Install openssl-devel with up2date:

up2date openssl-devel

Install Crypt-SSL

Install Crypt-SSL with perl:

perl -MCPAN -e shell \;

inside the shell run:

install Crypt::SSLeay




Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>