while (my ($k,$v1)= each %hash1){ local $"="\0"; if (my $v2= $hash2{$k}) { print "$k ungleich" if "@$v1" ne "@$v2" ; } }