in reply to Re^6: Getting for() to accept a tied array in one statement
in thread Getting for() to accept a tied array in one statement
For loops used to have the limitation to flatten the iterated structure to a list, which resulted sometimes in unfortunate memory requirements.
IIRC this was partially fixed by parsing if it's an @array or a range-operator, and acting like an iterator (ie for (reverse 1..1e18) remained problematic, because reverse was not detected)
I'd say this is the essential hook allowing your trick of iterating an "injected" tied array.
Did I miss something?
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Getting for() to accept a tied array in one statement
by hdb (Monsignor) on Apr 18, 2019 at 12:04 UTC | |
by LanX (Saint) on Apr 18, 2019 at 12:58 UTC | |
by hdb (Monsignor) on Apr 18, 2019 at 16:34 UTC | |
by pryrt (Abbot) on Apr 18, 2019 at 17:09 UTC | |
by hdb (Monsignor) on Apr 18, 2019 at 18:03 UTC | |
by LanX (Saint) on Apr 19, 2019 at 12:37 UTC |