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.
In reply to Re^4: Generating a Hash of Hashes Recursively to Display Database Hierarchy
by c4onastick
in thread Generating a Hash of Hashes Recursively to Display Database Hierarchy
by c4onastick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |