I believe the reason is that on each the hash constructed anew....
That's due to while, not each. If you used for, I'd find the code confusing (the while/each idiom is common), and you'd need a comment to explain why. It's simpler to use the temporary variable here.
In reply to Re: Iterating over verbatim hash reference
by chromatic
in thread Iterating over verbatim hash reference
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |