in reply to Listing Keys in a specific element(s) in an array of hashs

If you want all the unique keys from all the array elements, you can traverse it similar to as described above, and just keep track (in a hash) of the keys you've seen.
my %allKeys; foreach my $i ( 0 .. $#data ){ my $hash = $data[$i]; for (keys %$hash) { push @{$allKeys{$_}}, $i; } } foreach my $key ( sort keys %allKeys ){ my $locations = $allKeys{$key}; printf "Key '%s' was seen %d times at these indices: %s\n", $key, scalar @$locations, join(", ", @$locations); }