I want to take an xml file and recognize a particular tag and print what is in between that tag.
How can I refer to something that is nested?

Example: Books.xml

<title>Perl Magic</title>
<price currency="Rupees" value="330"/>

<title>Perl for Dummies</title>
<price currency="Rupees" value="420"/>


Perl script : books.pl

use XML::Simple;
use Data:: Dumper;

$xml = new XML::Simple;

$data = $xml->XMLin("books.xml");

print "$data->{author} is the author of $data->{title} and it is published by $data->{publisher}\n"

I'm not getting the correct output for this. What am I missing?