Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Getting for() to accept a tied array in one statement

by ikegami (Patriarch)
on Apr 19, 2019 at 08:39 UTC ( [id://1232796]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Getting for() to accept a tied array in one statement
in thread Getting for() to accept a tied array in one statement

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1232796]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-03-28 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found