in reply to LWP::SIMPLE fails on certain URL
my script:
produces the following output:#!/usr/bin/perl -w use strict; $|=1; use LWP::Simple; use LWP::UserAgent; print "\$LWP::Simple::VERSION is $LWP::Simple::VERSION\n"; print "Content-type: text/html\n\n"; my $url = "http://wire.ap.org/APnews/center_minor.html?FRONTID=SCIENCE +"; my $body = get("$url"); print "$body";
with the default distribution from ActiveState in build 631. i downloaded and installed libwww-perl-5.63 in an alternate directory and prepended it to @INC, yeilding:C:\WINDOWS\Desktop>perl test_lwpsimple.pl $LWP::Simple::VERSION is 1.33 Content-type: text/html Use of uninitialized value in string at test_lwpsimple.pl line 16. C:\WINDOWS\Desktop>
so it looks like an upgrade will do you good.C:\WINDOWS\Desktop>perl -Ic:\perllib\libwww-perl-5.63\lib test_lwpsimp +le.pl $LWP::Simple::VERSION is 1.35 Content-type: text/html <!-- pcache/1.7.3 Cache loaded from file on warrant Sun Jan 27 07:34:0 +9 2002 --> <!-- $Id: WirePortal.pcgi,v 1.10 2001/12/13 21:04:53 jxu Exp $ --> <HTML> <HEAD> <META HTTP-EQUIV=Refresh CONTENT="1; URL=/public_pages/WirePortal.pcgi +/nojs.html "> <TITLE>Testing JavaScript</TITLE> <script language="JavaScript"> <!-- function gogo() { self.location.href='/public_pages/WirePortal.pcgi/us_portal.html' } // --> </script> <BODY BGCOLOR="#FFFFFF" onload="gogo()"> </BODY> </HTML> C:\WINDOWS\Desktop>
~Particle
|
|---|