How can I pass an array resulting from a Perl method by reference?
- by arareko
Some XML::LibXML methods return arrays instead of references to arrays.
Instead of doing this:
$self->process_items($xml->findnodes('items/item'));
I want to do something like:
$self->process_items(\$xml->findnodes('items/item'));
So that in process_items() I can dereference the original array instead of creating a copy:
sub…