my %hash = ( foo => ['this', 'that'], # Two different values bar => ['those', 'those'], # Two identical values baz => ['the', 'other'], # Not the same buzz => ['same', 'same'], # The same ); while (my ($key, $aref) = each %hash) { if ($aref->[0] eq $aref->[1]) { print "$key\n"; } }