in reply to trouble with each and a hash of hashes

perldoc -f each

There is a single iterator for each hash, shared by all "each", "keys", and "values" function calls in the program; it can be reset by reading all the elements from the hash, or by evaluating "keys HASH" or "values HASH". If you add or delete elements of a hash while you're iterating over it, you may get entries skipped or duplicated, so don't.
  • Comment on Re: trouble with each and a hash of hashes

Replies are listed 'Best First'.
Re^2: trouble with each and a hash of hashes
by CountZero (Bishop) on Sep 11, 2004 at 13:14 UTC
    If you reset the iterator, shouldn't it start all over again? So instead of skipping the while loop, it would run it again from the very beginning.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law