in reply to Re: XML::XPath Question
in thread XML::XPath Question
Actually, another question.. the doc says that findnodes
"Returns a list of nodes found by $path, optionally in context $context. In scalar context returns an XML::XPath::NodeSet object."
I had taken that to mean that since I am invoking the method inside the braces for a foreach loop
foreach my $node ($tree->findnodes())It would return a list of nodes.. Isn't that a list contest? Why would it be a scalar context?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: XML::XPath Question
by Corion (Patriarch) on Nov 10, 2010 at 20:32 UTC |