my $yahoo_response = get($req_url);
my $xmlsimple = XML::Simple->new();
my $yahoo_xml = $xmlsimple->XMLin($yahoo_response);
foreach my $result (@{$yahoo_xml->{Result}}) {
# Make sure result has a thumbnail
my $title = $result->{Title};
my $url = $result->{Url};
my $click_url = $result->{ClickUrl};
# $click_url =~ s/&/&/g;
if (ref($result->{Cache}) eq "HASH") { ##If it has a Cache at all
my $cacheUrl = $result->{Cache}->{Url};
my $cacheSize = $result->{Cache}->{Size};
$out .= "Record: $count
\n";
$out .= "Title: $title
\n";
$out .= "Url: $url
\n";
$out .= "CacheUrl: $cacheUrl
\n";
$out .= "CacheSize: $cacheSize
\n";
}
print "out\n$out----\n";
$out = "";
$count++;
}