in reply to problems with Xpath

According to the documentation for find:

The find function takes an XPath expression (a string) and returns either an XML::XPath::NodeSet object containing the nodes it found (or empty if no nodes matched the path), or one of XML::XPath::Literal (a string), XML::XPath::Number, or XML::XPath::Boolean. It should always return something - and you can use ->isa() to find out what it returned.

You're getting a NodeSet. When you get a NodeSet, you can get a list of matching nodes using ->nodelist.