in reply to LWP::UserAgent error Unexpected keys - LocalHost
Just say not to typing effort http://www.perlmeme.org/tutorials/lwp.html
use WWW::Mechanize, its everything you wanted LWP to be
Same program with less typing
#!/usr/bin/perl -- use strict; use warnings; use WWW::Mechanize 1.73; my $ua = WWW::Mechanize->new( autocheck => 1 ); $ua->show_progress(1); $ua->get( 'http://perl-tutorial.org/' ); print $ua->content; __END__ ** GET http://perl-tutorial.org/ ==> 200 OK (1s) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ...
Also, upgrade LWP, like with cpanm LWP
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: LWP::UserAgent error Unexpected keys - LocalHost
by trendle (Novice) on Jul 29, 2014 at 22:18 UTC | |
by Anonymous Monk on Jul 29, 2014 at 23:51 UTC |