http://qs321.pair.com?node_id=581169

eisdrache has asked for the wisdom of the Perl Monks concerning the following question:

I have a script which takes a given url, examines the header of the page and then prints the server info to stdout. Very simple code, here it is for reference:

use strict; use LWP::Simple; print "URL: "; chomp(my $url = <STDIN>); my (undef, undef, undef, undef, $server) = head($url); print "Server: $server\n";

If I enter any url using standard http protocol (e.g. http://www.amazon.com) the script works fine. However, if I enter a url using https protocol (e.g. https://www.amazon.com) the script fails with a segmentation fault (coredump).

My LWP module supports https, I have OpenSSL installed, and I have Crypt::SSLeay and Net::SSLeay installed. But I cannot get past this problem and I am ready to start pulling my hair out over it.

Any ideas are much appreciated. Thank you in advance for any help.