Okay, sorry to be somewhat unclear with my question. Here’s some sample input data that may help to clear things up:
####################### node_id = 0 parent_node_id = N/A child_node_ids = 1, 2 node_id = 1 parent_node_id = 0 child_node_ids = 3, 4 node_id = 2 parent_node_id = 0 child_node_ids = 5, 6, 7 node_id = 3 parent_node_id = 1 child_node_ids = N/A node_id = 4 parent_node_id = 1 child_node_ids = 8, 9 node_id = 5 parent_node_id = 2 child_node_ids = N/A node_id = 6 parent_node_id = 2 child_node_ids = 10 node_id = 7 parent_node_id = 2 child_node_ids = N/A node_id = 8 parent_node_id = 4 child_node_ids = N/A node_id = 9 parent_node_id = 4 child_node_ids = 11, 12 #####...and so on ##### Notes: - node_id = 0 is the root node. - N/A means no further relationships exist. - Only one parent exists for each child. - The 'child_node_id' is redundant data. There will be similar descriptive data for each node, but it isn’t important for the structure of the tree. Question: How can I create a tree (i.e. a hash of hashes) given the above relationships? --- James Edward Gray II <[EMAIL PROTECTED]> wrote: > On Feb 4, 2004, at 1:38 PM, David Byrne wrote: > > > Greetings, > > Hello. > > > I’m trying to generate a tree of nested hashes [of > an > > arbitrary size]. > > I'm trying to run the code you posted, so I can see > what the heck is > going on. That's not going well for me either. > <laughs> My processor > usage spikes through the roof, but it doesn't seem > to get anywhere. > Does this run for you? > > > Perhaps you could suggest a better solution. > > Perhaps. I know you're building some sort of hash > tree, but I have no > idea why. Can you tell us what you're aiming for? > > > Currently I'm trying to use symbolic references > according to the > > literature but without much luck. > > My opinion is that we can do better than symbolic > references, yes. > Unfortunately, I don't understand what we're trying > to do. Take a step > back and explain the problem to us, if you would, > not the problem with > the implementation. > > James > > > -- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > <http://learn.perl.org/> > <http://learn.perl.org/first-response> > > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>