Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Logic for sorting of this given arrayby gmax (Abbot) |
on Aug 28, 2003 at 10:58 UTC ( [id://287304]=note: print w/replies, xml ) | Need Help?? |
If you want a tree, why don't you use a real tree structure? Tree::DAG_Node is meant for cases like this one.
You can also build a tree on the fly, from an existing list of lists. Notice that in this case the root is at the bottom (as in botanical trees ;-) )
For more examples, see Introduction to Tree::DAG_Node in Tutorials. Update Added code comments. _ _ _ _ (_|| | |(_|>< _|
In Section
Seekers of Perl Wisdom
|
|