in reply to Unknown number of XML nodes

Sounds like you want XML::XPath (or, alternatively, XML::LibXML which also has XPath support).

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg