I sure appreciate your help.

I have done quite a few things listed on the internet
with both Simple and UserAgent.

We see that many of the failing sites are govt
sites.  One guy can access all my Not Working sites,
but he says that glorecords and nationalmap.gov react
very slow, even when UserAgent uses the FireFox
identity.

I know I can use Mechanize and really dive into this.
And I might do that someday.  But for the moment I'm
thinking this is unlikely to get fixed in the next week.
Good thing I don't need this.


Mike



On 8/29/2019 5:35 AM, Olivier wrote:
I don't see why you have a 'die at line 21' while your script has way
less than 21 lines. Also, the script comes all mangled by the mail, so
one cannot say if the error is yours or the mailer.

Make your script simple first, so you can confirm your environment is
working:

#!/usr/bin/perl
use LWP::Simple;
$test=get('https://google.com');
print $test;

When that is working, start changing things one at a time and check at
each stage that it is still working.

You may also explore the documentation of LWP::Simple to get an error
message that makes sense, because what you get so far is only 'it does
not work', one cannot make a diagnostic with that only.

Good luck,

Olivier


#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple;


# Does not work

my $test = get('https://nationalmap.gov/epqs/pqs.php') or die 'Unable to get 
page'; # Does not work
#my $test = get('http://www.wrh.noaa.gov/zoa/mwmap3.php?map=usa') or die 
'Unable to get page'; # Does not work
#my $test = get('http://www.glorecords.blm.gov/') or die 'Unable to get page'; 
# Does not work
#my $test = get('https://glorecords.blm.gov/default.aspx') or die 'Unable to 
get page'; # Does not work


print "\nAll done.\n\n\$test = $test\n\n";


__END__




--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to