This should tell you if you are getting the source or if there is an error connecting. It could be simply that the sight is down or the TTL is expiring before your script gets the source.#!/usr/bin/perl -w use strict; use LWP::Simple; my $url = "http://www.perlmonks.org"; my $file = "output.txt"; my $proc = getstore($url, $file); print $proc;
Just change the value of $url to whatever sight is giving you issues.
The return value of $proc will be the web server code for the connection attempt. A return value of 200 means successfull and a return value of like 500 or 403, or 404 are error codes and means sometyhing was wrong with the request and the web server could not or will not handle it.
In reply to Re: question about LWP
by Elijah
in thread Site seems to be blocking my LWP script
by dchandler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |