Who said anything about it being unassigned?!? It's undefined which means the findnodes() on line 11 returned an undef. The notoriously bad docs of XML::LibXML do not say anything about what's this method supposed to return if the XPath query doesn't match anything, but an undef is a quite way to return "nothing". Even though rereading the docs it seems it's supposed to return a XML::LibXML::NodeList object in scalar context no matter what.
Jenda
Enoch was right!
Enjoy the last years of Rome.
In reply to Re^3: can't call method on an undefined error in perl script
by Jenda
in thread can't call method on an undefined error in perl script
by veerubiji
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |