my $hash = { k1 => { a => 1, b => 2, c => 3. }, }; foreach $key (sort keys $hash->{'k1'}->%* ){ print "$key\n"; }