in reply to Re^2: keys and values order on a hash
in thread keys and values order on a hash
You'll get that situation if you have something like
while (...each(%h)...) { ... last if ...; ... }
The solution is
keys(%h); # Reset iterator. while (...each(%h)...) { ... last if ...; ... }
Note that keys does not actually compute the list of keys in void context.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: keys and values order on a hash
by Somni (Friar) on Jul 11, 2011 at 18:50 UTC |
In Section
Seekers of Perl Wisdom