in reply to playing an array of google search results
use strict; use warnings; use WWW::Mechanize; my $agent = WWW::Mechanize->new(); my $regex = 'results'; my $url ='http://www.google.co.uk/search?hl=en&safe=off&q=intitle%3A%2 +2football+scores%22+inurl%3Aresults&meta=cr%3DcountryUK%7CcountryGB'; $agent->get($url); $agent->agent_alias( 'Windows IE 6' ); my @urls = $agent->find_all_links(); foreach my $link(@urls) { print "Link: ", $link->url(), "\n"; } # print out the content of the current page for debugging print $agent->response()->as_string();
|
|---|