widget1 0.10 B red blue green widget2 0.25 S pink gray orange #### use XML::Simple; $file = XMLin('./prod.xml'); foreach $products (@{$file->{product}}) { print "Widget: " . $products->{title} ." \n"; print "Rating: " . $products->{rating} . "\n"; print " Cost: " . $products->{cost} . "\n"; print "Colors: " . $products->{color} . "\n\n"; } #### Widget: widget1 Rating: B Cost: 0.10 Colors: ARRAY(0x19c5584) Widget: widget2 Rating: S Cost: 0.25 Colors: ARRAY(0x19c55f0)