#!/usr/bin/perl
# Another test of the Google API
use strict;
use warnings;
use SOAP::Lite;
my $google_search = SOAP::Lite->service("file:./GoogleSearch.wsdl");
my $google_key='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
my $query = 'kw.pm.org';
my $results = $google_search ->
doGoogleSearch(
$google_key, $query, 0, 10, "false", "", "false",
"", "latin1", "latin1"
);
@{$results->{resultElements}} or exit;
foreach my $result (@{$results->{resultElements}}) {
print
join "\n",
$result->{title} || "no title",
$result->{URL},
$result->{snippet} || 'no snippet',
"\n";
}