in reply to Re^10: Getting for() to accept a tied array in one statement
in thread Getting for() to accept a tied array in one statement
No, the approach you describe fails. It gives incorrect result for any of the following:
for ($additional, @tied) { } map f(), @tied say "@tied"; ...
Therefore, the class must provide a FETCHSIZE must return the correct size up front. It doesn't matter that you can rely on a bug to get away with it in for (@tied).
Updated for clarity.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^12: Getting for() to accept a tied array in one statement
by perlancar (Hermit) on Apr 25, 2019 at 05:37 UTC | |
by ikegami (Patriarch) on Apr 25, 2019 at 17:24 UTC | |
|
Re^12: Getting for() to accept a tied array in one statement
by perlancar (Hermit) on Apr 26, 2019 at 03:00 UTC | |
by ikegami (Patriarch) on Apr 28, 2019 at 19:13 UTC |