in reply to Best Multidimensional Hash Practices?
if ($myHash{unknown}{if}{this}{key}{combination}{exists}{yet}{or}{not} ){...}
Unless this is some kind of data structure that you have no control over, You're Doing It Wrong.
If something is really that deeply nested - and might not exist - I'd say that there is a real architectural problem.
Something else to take a look at is Data::DPath which might render your code as simple as this:
use Data::DPath 'dpath'; if( dpath('/unknown/if/this/key/combination/exists/yet/or/not') ) { # Yay }
|
|---|