use URI; use LWP::UserAgent; my $what_i_want_to_find = 'perl monks'; $ua = LWP::UserAgent->new; # google doesn't like it when user agent is libwww perl, so # I change it to Mozilla/5.0 $ua->agent('Mozilla/5.0'); my $uri = URI::new; $uri->query_form('q'=>$what_i_want_to_find); my $url = 'http://www.google.com/search' . $uri->as_string; my $req = HTTP::Request->new(GET => $url); my $res = $ua->request($req)->as_string; $res =~ /\