my %foo = (a => 1, b => 2); for (1..10) { each %foo or print "re-init $_\n"; } __END__ re-init 3 re-init 6 re-init 9
each uses an iterator tied to the variable. If you use it, you interfer with other (and even your own) usages of that iterator.
In reply to Re^2: lazy creation of a hash
by moritz
in thread lazy creation of a hash
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |