You could use a recursive function to drive down into your tree structure. You hand it the root node, and it then runs itself on each of the children using them as the root nodes. The function would return a hash of nodes with the keys being the node, and the value being a hashref of the children. Then you just iterate over the final list using the keys, and if there are values follow those as well. In fact i think you could build an iterative solution that just does that last bit.
In reply to Re: Database categories
by eric256
in thread Database categories
by coldfingertips
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |