in reply to Adjacency List Processing in XML::Twig
I'd change the double-grep (which also happens to be a nested grep) to a grep-map:
grep { $_->text eq $search_text } map { $_->children } @data; # or grep $_->text eq $search_text, map $_->children, @data;
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
In Section
Tutorials