in reply to
Categories. Table of Contents. Trees?
Tree.pm looks like a pretty decent start for you. If not, you might consider making your own module. If you make your own module there are a few things to take into consideration.
- Each node should have a unique id
- Each node should have a parent id that it refers to (0 if it has no parents)
- Each node may have children nodes
Is this a tree that you will be creating from scratch? or reading in from a file or system (i.e. directory tree). After quickly looking at CPAN it seems theres a few modules. For my needs, i've always made my own since my nodes require more complex objects than just parent/child relationships. The main idea behind a tree layout is the parent/child relationship; so if you can get that down the rest should eventually fall into place. Hope this helps.