xml parsing error in perl

PERL VERSION******
This is perl, v5.8.1 built for i386-linux-thread-multi

ERROR!!!!---Undefined subroutine &main::start called at /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/XML/Parser/Expat.pm line 469.

PERL CODE***
# include package
use XML::Parser;
# initialize parser
$xp = new XML::Parser;
# set callback functions
$xp->setHandlers(Start => \&start, END => \&end, Char => \&cdata);
# parse XML
$xp->parsefile("page1.xml");

***XML FILE
<?xml version="1.0"?>
<library>
<book>
<title>Dreamcatcher</title>
<author>Stephen King</author>
<genre>Horror</genre>
<pages>899</pages>
<price>23.99</price>
<rating>5</rating>
</book>
</library>

Plz remove the error if possible....

But where are the start(), end() and cdata() subroutines? Are you sure you have defined them in your code? As you are trying to pass reference to those to XML::Parser. If they are not defined, XML::Parser on dereferencing them will cause the error. It's not even a parsing error so there is nothing to do with your XML file.

In fact you can repeat the error with something as simple as

root@xxxxxx:~ # perl -w -e '$a = \&xxxx; &$a'
Undefined subroutine &main::xxxx called at -e line 1.