for $x (keys %one) { print "DIFF: $x\n" if $one{$x} ne $two{$x}; } for $x (keys %two) { print "DIFF2: $x\n" unless $one{$x}; }