Q: LWP::Simple not get()-ting.

From: Jeff Bernstein (jeffbernstein_at_yahoo.com)
Date: 06/11/04


Date: 10 Jun 2004 19:34:05 -0700

Greetings:

Okay, it looks like the get() function in LWP::Simple is failing on my
machine (Macintosh G4 running Panther). I try this one-liner:

-------------------------------------------------------------
perl -MLWP::Simple -e 'getprint "http://www.linpro.no/lwp/"'
-------------------------------------------------------------

and I get this back:

-------------------------------------------------------------
404 Not Found <URL:http://www.linpro.no/lwp/>
-------------------------------------------------------------

I know the site is up but to make sure I've run it against Yahoo, etc.
Same result (on my G4; my iBook works fine).

When I run this script:

-------------------------------------------------------------
#!/usr/bin/perl -w
# Identify a server.
use strict;
use LWP 5.58;

my $browser = LWP::UserAgent->new();
my $response = $browser->get("http://www.oreilly.com/");
print $response->header("Server"), "\n";
-------------------------------------------------------------

I get this back:

-------------------------------------------------------------
Apache/1.3.29 (Unix) PHP/4.3.4 mod_perl/1.29
-------------------------------------------------------------

So LWP seems to be working (on both the G4 and the iBook).

Any ideas? Do I need to reinstall LWP (from CPAN)? I'm Googleing my
brains out.

Jeff