in reply to using keys on hash of hash

What pjf is saying to you is this:

keys operates on hashes, not on hash references. By dereferencing the reference, you turn it back into a hash and keys then knows what to do with it. Your issue is not that you are handling a hash_of_hashes, but that you are dealing with a reference to a h_o_h.

-- Hugh

if( $lal && $lol ) { $life++; }