in reply to List Values As Multidimensional Hash Keys

I'm curious - what's the need to have this as a tree? Are you planning on working with all the children at a specific level?

The reason I ask is that if all you want are straight lookups from the root node, it would be easier to have the path to the leaf as the entry itself. So, you can cut out the split on ':' and just have the hash key be "a1:a2:a3". (In other words, flatten the tree.)

------
We are the carpenters and bricklayers of the Information Age.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

  • Comment on Re: List Values As Multidimensional Hash Keys

Replies are listed 'Best First'.
Re: Re: List Values As Multidimensional Hash Keys
by joule (Acolyte) on Mar 15, 2004 at 16:06 UTC
    The file I'm parsing contains strings which are used for a program's configuration files. The configuration files themselves are stored in various directories/sub-directories. I want to provide a logical grouping of the configuration files while also providing flexibility and extensibility with the program's configuration. Hope that makes sense, it's hard to describe with words... :)