my $href; @{ $href }{ 'a' .. 'z' } = 1 .. 26; my @required_fields = qw[ a c e g i k m o q s u w y ]; for my $k ( \( @h{ @required_fields } ) ){ print $$k; } 1 3 5 7 9 11 13 15 17 19 21 23 25 #### while( my( $kref, $vref ) = \( each %{ $href } ) ) { print $$kref, ' => ', $$vref; }