%hash = ( key1 => { subkey1 => 'value1', subkey2 => 'value2', subkey3 => 'Ovid' } ); print scalar keys %{$hash{ key1 }};