foreach my $k (keys %hash1) { next unless exists $hash2{$hash1{$k}}; $hash1{$k} = $hash2{$hash1{$k}}; }
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
In reply to Re: Replace the value of a hash
by dragonchild
in thread Replace the value of a hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |