in reply to Trying to pull the key values from a Hash

"I want to get just the values of each child for a certain parent"

"How do I get the key values for the first branch (parent id) of the hash?"

Note that the values for each key for parents is actually a reference and so is the value for each child key(a, b, c) in this data structure... If you meant by values that you want the IDs for each child of a certain parent, as I understood, then I hope the following excerpt of code can be of help.
#!/usr/local/bin/perl use strict; use warnings; my %children; #each parent has 3 children identified by their IDs $children{'parent1'}{'a'}{'id'} = 'Child1P1'; $children{'parent1'}{'b'}{'id'} = 'Child2P1'; $children{'parent1'}{'c'}{'id'} = 'Child3P1'; $children{'parent2'}{'a'}{'id'} = 'Child1P2'; $children{'parent2'}{'b'}{'id'} = 'Child2P2'; $children{'parent2'}{'c'}{'id'} = 'Child3P2'; for my $parent (sort keys (%children)){ print "The key value is a reference of type: ", ref $children{$par +ent}, $/; print "The parent is $parent:\n"; for my $child (keys (%{$children{$parent}})){ print "children of $parent-> $children{$parent}{$child}{'id +'}\n"; } print "\n\n"; }
#OUTPUT:
The key value is a reference of type: HASH The parent is parent1: children of parent1-> Child3P1 children of parent1-> Child1P1 children of parent1-> Child2P1 The key value is a reference of type: HASH The parent is parent2: children of parent2-> Child3P2 children of parent2-> Child1P2 children of parent2-> Child2P2


Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.