Re: query reg https protocol
Kevin Philp <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.lwp |
|---|---|
| Message-ID | <[email protected]> |
Pratima,
Not sure what has happened but I tried the following and it worked fine.
https://www.example.com doesn't return anything when I tried - maybe
that is the problem?
#!/usr/bin/perl
use warnings;
use strict;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new('GET', 'https://www.cybercolloids.net');
my $res = $ua->request($req);
print $res->content, "\n";
prats wrote:
> Hi,
>
> I am trying to invoke https url using perl.
> I ran the below sample code.
>
> use LWP::UserAgent;
> my $ua = LWP::UserAgent->new;
> my $req = HTTP::Request->new('GET', 'https://www.example.com/');
> my $res = $ua->request($req);
> print $res->content, "\n";
>
> And i got the following error: (sample2 is my file name)
> [1] + Done(139) sample2
> 5764 Segmentation violation sample2
>
> Any help is appreciated.
>
> Thanks,
> Pratima.
>
>
> Did you know? You can CHAT without downloading messenger. Go to http://in.messenger.yahoo.com/webmessengerpromo..php/
>
>
>
>