#!/usr/bin/perl -w use strict; use SOAP::Lite; my $key = 'UxUxUxUxUxUxUxUxUxUxUxUxUxUxUxUx'; my $query = $ARGV[0] || "foo"; my $googleSearch = SOAP::Lite -> service("file:GoogleSearch.wsdl"); my $result = $googleSearch -> doGoogleSearch($key, $query, 0, 10, "false", "", "false", "", "latin1", "latin1"); print "About $result->{'estimatedTotalResultsCount'} results.\n"; foreach my $entry (@{$result->{'resultElements'}}) { print "- $entry->{title} \t$entry->{URL}\n"; } __END__ # http://api.google.com/GoogleSearch.wsdl # http://www.google.com/apis/reference.html