Assuming I have a hash like this:
$hash_ref = {
'hashes' => {
'h1' => { 'klf' => '1', 'moomooland' => '1' },
'h2' => { 'klf' => '2', 'moomooland' => '2' },
'h3' => { 'klf' => '3', 'moomooland' => '3' }
},
'keys' => {
'k1' => 'key1',
'k2' => 'key2',
'k3' => 'key3'
}
}
How could I find out, as easy as possible, that hashes
contains 3 more hashes, while keys
contains 3 key/value pairs?
ref
will return HASH
for both of them, and I am not sure if it is possible to maybe find out the depth of these hashes.
Thanks :)