in reply to Re^3: Generating a Hash of Hashes Recursively to Display Database Hierarchy
in thread Generating a Hash of Hashes Recursively to Display Database Hierarchy
Ah, my apologies! My short hand with $data got a little too short! $data really looks like this:
my $data = [ [ 'parent1', 'child1', 'grand_child1', undef, ], [ 'parent1', 'child2', 'grand_child2', 'great_grand_child1',], [ 'parent1', 'child3', undef, undef,], ];
Or:
my $data = [ [ 'parent1', 'child1' ], [ 'child1', 'grand_child1' ], [ 'parent1', 'child2' ], [ 'child2', 'grand_child2' ], [ 'grand_child2', 'great_grand_child2' ], [ 'parent1', 'child1c' ], ];
But because of our extended table structure, I'm sure how I can (easily) make it look like the second form though.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Generating a Hash of Hashes Recursively to Display Database Hierarchy
by ikegami (Patriarch) on Jun 23, 2009 at 17:17 UTC |
In Section
Seekers of Perl Wisdom