<?xml version="1.0" encoding="windows-1252"?>
<node id="93096" title="Re: Re: Any idea why LWP:Simple doesn't like this particular website?" created="2001-07-02 02:14:44" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="43868">
epoptai</author>
<data>
<field name="doctext">
As long as you've got -w and [diagnostics] you might as 
well use [strict] and put them to good use. Also declare 
your variables with [my] so typos will be apparent. When 
that is done the only error left is this enigmatic line:
&lt;code&gt;
die "$!";
&lt;/code&gt;

which should just be [exit] so it won't try to print the 
empty $doc and get that nasty uninitialized value warning.

Try this:

&lt;code&gt;
 #!/usr/bin/perl -w

 use strict; # added
 use diagnostics;
 use CGI::Carp qw(fatalsToBrowser);
 use LWP::Simple;

 my$doc;
 my$theURL = 'http://www.theredkitchen.net/';

 print "Content-type: text/html\n\n";
 print "The script has successfully started up.\n\n&lt;BR&gt;&lt;BR&gt;";
 
 unless($doc=get($theURL)){
     print "can't get the URL";
     exit; # added
     }
 print $doc;
 exit;
&lt;/code&gt;
This code is tested and works. If it doesn't work for you 
the problem may lie elsewhere...</field>
<field name="root_node">
93078</field>
<field name="parent_node">
93094</field>
</data>
</node>
