It seems FETCHSIZE is only called once, but each element is fetched right before the iteration:
That's correct. for (@a) iterates over the indexes as if you had done for (0..$#a). This differs from for ((), @a), which retrieves the contents of @a up front.
In reply to Re^4: Getting for() to accept a tied array in one statement
by ikegami
in thread Getting for() to accept a tied array in one statement
by perlancar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |