http://www.perlmonks.org?node_id=475156


in reply to Re^2: Ouch! Each! Reentrant it is not
in thread Ouch! Each! Reentrant it is not

keys and values don't depend on the iterator, just each.

Replies are listed 'Best First'.
Re^4: Ouch! Each! Reentrant it is not
by Thilosophy (Curate) on Jul 15, 2005 at 09:51 UTC
    Experimentation proves you right. Interesting. I must have mis-interpreted the perldoc:

    There is a single iterator for each hash, shared by all "each", "keys", and "values" function calls in the program.

      That just indicates that keys and values affect the iterator (resetting it).