According to perldoc -f each, you should not add keys to a hash while you are iterating over it in an each loop.
That's true, but the OP wasn't adding keys to the hash. He was modifying values. And that's perfectly save as the iterator iterates over keys, not values.
Abigail
In reply to Re: Merging 2 hashes
by Abigail-II
in thread Merging 2 hashes - updated again
by rspence
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |