if ( exists $hash{0} and exists $hash{0}{2} ) ...