in reply to Re^3: XPath query issue...
in thread XPath query issue...

... which is what both use strict; and use warnings; would have told you, if you had used them.