There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You could do the standard tree-thing and use a more standard linked_list solution. Something like:
Note: untested Then you'd have a real tree-structure, which you could iterate recursively. You don't get the ease of the quick solution, but you get some robustness and flexibility. Plus, you can wrap this in a class structure and write accessor methods. Best of all, you could use Class::Tree, which provides a premade OO interface to treelike structures of this kind... Haven't used it myself, but the docs list methods for reading directory trees directly from the filesystem. stephen In reply to Re: Data structure question: Directory-in-memory ?
by stephen
|
|