if (exists $hash->{A}->{B2}->{C}) { ... #### for my $k (keys %{ $hash->{A}->{B2} } ){ ... #### $hash->{'A'}->{'B2'}->{*} #is actually Equivalent to my @subkeys = keys %{ $hash->{A}->{B2} }; #at least - I think this is where you were heading...
## for my $k (keys %{ $hash->{A}->{B2} } ){ ... ##
## $hash->{'A'}->{'B2'}->{*} #is actually Equivalent to my @subkeys = keys %{ $hash->{A}->{B2} }; #at least - I think this is where you were heading...