I suggest you read about XML DOM and XPath, then look for XML modules on CPAN, to help you.
Remember: PerlMonks is not a programming service. Please read the guidelines on How (Not) To Ask A Question.
In a few words, you should try to solve the problem by yourself first, Google for answers, then if all this fails, post a question here and include your non-working or partially working code with it. You are more likely to have valuable answers this way.
Testing never proves the absence of faults, it only shows their presence.