|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re: Generating a list of lists (for HTML::Element) from trivial markupby alexm (Chaplain) |
| on Jul 27, 2008 at 23:25 UTC ( [id://700433]=note: print w/replies, xml ) | Need Help?? |
|
You're always pushing new elements on the same array in different positions, not different depths:
For instance, in order to h2 being a child of greybox you should:
Where depth means there's 2 array references involved. That's why the recursive solution provied by jethro works better: recursion and depth are intimate concepts.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||