my %hash = ( 'B' => { 'A' => 4 , 'B' => 8 } ); while ( my ( $k , $v ) = each %{ $hash{'B'} } ) { print "$k : $v\n"; }