in reply to Re^4: How to create a Tree::DAG_Node tree with sorted hash elements
in thread How to create a Tree::DAG_Node tree with sorted hash elements

benny_vroom:

The sorting was not intended to show the hierarchy of the nodes, but to give you an order to insert nodes with your original code that would give you the correct results. Given your original code, it would always work if (and only if) you inserted the larger ranges before the smaller ones.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re^5: How to create a Tree::DAG_Node tree with sorted hash elements

Replies are listed 'Best First'.
Re^6: How to create a Tree::DAG_Node tree with sorted hash elements
by benny_vroom (Initiate) on Jun 21, 2011 at 16:50 UTC

    OK, Now I get what you are saying. I should always insert the ACL's with larger ranges in to the tree first. I also take that you suggest to go ahead with creating a Tree to get this done. Let me try this and update back how it works!

    Thanks for your useful comments so far!