in reply to How do I make all the values in %a with common keys in %b equal to %b's values?

How do I make all the values in %a with common keys in %b equal to %b's keys?
Shouldn't that last keys be changed to values? Either that, or everyone has answered the wrong question.

For the question asked, it seems this would work:

$a{$_} = $_ for (grep exists $b{$_}, keys %a);
  • Comment on Re: How do I make all the values in %a with common keys in %b equal to %b's keys?
  • Download Code