scforeach (sort keys %{{%a, %b}}) { if (!exists($b{$_})) { print "$_ only in a\n" } elsif (!exists($a{$_})) { print "$_ only in b\n" } elsif ($a{$_} ne $b{$_}) { print "$_: values in a and b differ\n" + } }
In reply to Re: diff of two hashes.
by snowcrash
in thread diff of two hashes.
by ChuckularOne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |