following crazyinsomniac:

my script:

#!/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";
produces the following output:

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>
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 -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>
so it looks like an upgrade will do you good.

~Particle


In reply to Re: LWP::Simple fails on certain URL by particle
in thread LWP::SIMPLE fails on certain URL by cdherold

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.