my %prochash; # sub call to populate hash for (my $i = 0; $i < $prochash{NumProcessors}; $i++) { foreach (keys %{$prochash{'Processor$i'}}) { print "$_ : ",$prochash{"Processor$i"}->{$_},"\n"; } }