in reply to Re^6: LWP::Simple Empty File
in thread LWP::Simple Empty File

Well, I am sorry that I couldn't be of more help.
I am just flabbergasted as to how this code not only fails to get the web page $content on your machine, but winds up with a null string for $content instead of an undef value.
#!/usr/bin/perl -w use strict; use LWP::Simple; $|=1; #turn off buffering so we see all the lines print "starting...get...\n"; my $content = get("http://perlmonks.org/?node_id=957704"); die "blank content" unless defined $content; print "ending...get...\n"; print $content; print "END of CONTENT\n";
The above code runs on my machine. This is bizarre.

I guess now we come down to the very improbable...how did you install LWP::Simple on your Windows machine?

Replies are listed 'Best First'.
Re^8: LWP::Simple Empty File
by idlemind (Initiate) on Mar 04, 2012 at 21:50 UTC

    I want to thank everyone who helped me with this. Marshall particularly. I don't know what the problem was but I just uninstalled the version I had and installed the latest version of Strawberry Perl again. Voila, LWP:Simple is working now. For completeness, I install LWP:Simple by using CPAN and package in the command prompt.