in reply to Re: Parsing Yahoo XML Response
in thread Parsing Yahoo XML Response

This seems to be working. Does it look better to you?
Thanks
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/&/&amp;/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<br>\n"; $out .= "Title: $title<br>\n"; $out .= "Url: $url<br>\n"; $out .= "CacheUrl: $cacheUrl<br>\n"; $out .= "CacheSize: $cacheSize<br>\n"; } print "out\n$out----\n"; $out = ""; $count++; }