##
sub foo{
my (%hash) = @_; #! Wrong!
for my $key (keys %hash) {
do stuff
}
}
...
foo( %hash ); #! Wrong!
####
exists $b{$k} or delete $a{$k} while ($k,$v) = each %a;
####
exists $b{$k} and $c{$k}=$v while ($k,$v) = each %a