Perl, check if pair exists in hash of hashes
In Perl, I have a hash of hashes created with a loop similar to the following

        my %HoH
        for my $i (1..10) {
          $HoH{$a}{$b} = $times; 
        }

$a and $b are variables that do have some value when the HoH gets filled in. After creating the HoH, how can I check if a particular pair ($c, $d) exists in the HoH? The following does not work

    if (defined $HoH{$c}{$d}) {...}

because if $c does not exist in HoH already, it will be created as a key without a value.
Perl, check if pair exists in hash of hashes
===

In Perl, I have a hash of hashes created with a loop similar to the following

        my %HoH
        for my $i (1..10) {
          $HoH{$a}{$b} = $times; 
        }

$a and $b are variables that do have some value when the HoH gets filled in. After creating the HoH, how can I check if a particular pair ($c, $d) exists in the HoH? The following does not work

    if (defined $HoH{$c}{$d}) {...}

because if $c does not exist in HoH already, it will be created as a key without a value.