mrguy123 has asked for the wisdom of the Perl Monks concerning the following question:
When I run this from the command line (./demo_https) it works (doesn't fetch anything, but doesn't crash). However, when I run it using the "perl command" (perl demo_https), I get that most hated of all errors: "Segmentation fault". I also get this error when using a private Perl path, and not /usr/bin/perl.#!/usr/bin/perl use strict; use LWP::UserAgent; { ##The Perl Module that does the work my $ua = new LWP::UserAgent(); ##The URL my $url = "https://www.guy.com/"; ##Creating the request my $req = new HTTP::Request ('GET',$url); ##Getting the HTML page my $res = $ua->request($req); ##Printing the HTML page print $res->content."\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTTPS transactions with LWP::UserAgent
by shmem (Chancellor) on Dec 17, 2007 at 10:01 UTC | |
by Herkum (Parson) on Dec 17, 2007 at 19:05 UTC | |
|
Re: HTTPS transactions with LWP::UserAgent
by moritz (Cardinal) on Dec 17, 2007 at 09:48 UTC | |
by mrguy123 (Hermit) on Dec 18, 2007 at 07:06 UTC | |
|
Re: HTTPS transactions with LWP::UserAgent
by snowhare (Friar) on Dec 17, 2007 at 11:24 UTC |