use strict; use warnings; use Data::Dumper; use XML::Simple; my $xml = XMLin('amazon.xml'); # print url attrib from
print $xml->{Details}{url}, "\n"; # print each rating print $_->{Rating}, "\n" for @{ $xml->{Details}{Reviews}{CustomerReview} }; # uncomment this line to print the entire data structure #print Dumper $xml;