in reply to Re^4: Why does each() always re-evaluate its argument? (Updated x2 - experimental "for_list" )
in thread Why does each() always re-evaluate its argument?
If that's so, then the docs should be clearer:
> 2) it uses the built-in iterator.
In that case, I suppose nested loops over the same hash are covered by saving and restoring the localized iterator?
I was expecting a more intelligent solution than literally "copying to a flat list" but this also leads to another question:
What happens if the hash is altered inside the loop, if it's not copied "before the loop starts"
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Why does each() always re-evaluate its argument? ("for_list" )
by ikegami (Patriarch) on Dec 07, 2023 at 20:11 UTC | |
by LanX (Saint) on Dec 07, 2023 at 20:20 UTC | |
by ikegami (Patriarch) on Dec 07, 2023 at 20:27 UTC | |
by NERDVANA (Priest) on Dec 07, 2023 at 23:36 UTC | |
by LanX (Saint) on Dec 08, 2023 at 00:34 UTC | |
| |
by ikegami (Patriarch) on Dec 08, 2023 at 17:07 UTC | |
|