in reply to Re: overload + each() bug
in thread overload + each() bug?

To elaborate, the problem is that the hash is recreated each time, which means the internal iterator is also recreated each time. The same behavior will show up for keys() and values(), as well.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^3: overload + each() bug
by jdhedden (Deacon) on Nov 17, 2005 at 17:29 UTC
    The same behavior will show up for keys() and values(), as well.
    Incorrect. keys() and values() are not iterators. They return lists composed of data from the hash argument. When used in a 'for' loop, they only get called once.
    Remember: There's always one more bug.