l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2001 Dec 30 16:59

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] LWP module of Perl
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] LWP module of Perl


You have any idea why this bit of code doesn't work?  I'm trying to access a
secure site:

Is there something special (like use a different package...) to access a https
site using LWP?  My script below works fine going against a http page but not
against an https site.


use strict;
use LWP::UserAgent;

#**********    This Works      ***********
my $uri = URI->new('http://www.yahoo.com');

#**********    This Doesn't    ***********
#my $uri =

my $ua = new LWP::UserAgent;
$ua->agent("MyAgent/0.1 ". $ua->agent);

my $request = new HTTP::Request('GET' , $uri );
my $response = $ua->request($request);

print $response->content;

Jay Strauss
(h) 773.935.5326
(c) 312.617.0264

----- Original Message -----
From: "Jay" <jstrauss@bazillion.com>
To: <vox-tech@franz.mother.com>
Sent: Wednesday, December 20, 2000 6:08 PM
Subject: Re: [vox-tech] LWP module of Perl

> You're right, I'm finding examples in the perldoc.  I didn't understand
> till now.  Now I'm perldocing everything (and making steady (but slow)
> progress), and learning object oriented perl in the process.
> Jay
> Jay Strauss
> jstrauss@bazillion.com
> (h) 773.935.5326
> (c) 312.617.0264
> ----- Original Message -----
> From: "Micah Cowan" <micah@cowanbox.com>
> To: <vox-tech@franz.mother.com>
> Sent: Wednesday, December 20, 2000 1:37 PM
> Subject: Re: [vox-tech] LWP module of Perl
> > On Wed, Dec 20, 2000 at 08:59:21AM -0600, Jay wrote:
> > > Do anyone have any experience using the LWP (libwww) module of perl?  I'm
> trying
> > > to use it, but it is wholly short of examples?
> >
> > Are you serious?  There're plenty of examples.  Under the LWP manpage,
> > look under the subtly titled "An Example".  And other examples below that.
> >
> > You will also probably find the LWP::UserAgent manpage to be
> > of value; though that one /doesn't/ have much for examples...
> >
> > ;)
> >
> > Micah
> >

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.