in reply to Re: lazy creation of a hash
in thread lazy creation of a hash
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.
|
|---|