in reply to hash keys compare
To answer your question, you can use exists:
If this is not what you mean, you'd probably have to explain why $c and $f are not the same value in your post, and how $a,$b,$d and $e are determined.for my $key (keys %{$hash->{$a}{$b}}) { unless (exists $hash2->{$d}{$e}{$key}) { die "Key $key not found in hash2"; } }
|
---|