Download webpage source to a string in Perl
How do I do it?
I would also like to use a prox开发者_运维百科y. How do I do that?
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
$mech->get("http://foo.com/bar");
my $content = $mech->res()->content();
For the proxy, see the Mechanize FAQ.
精彩评论