Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: How foreach loops decide what to iterate through

by jvector (Friar)
on Feb 15, 2009 at 22:38 UTC ( #743966=note: print w/replies, xml ) Need Help??


in reply to Re^3: How foreach loops decide what to iterate through
in thread How foreach loops decide what to iterate through

The insight moment for me in this thread was getting when it is that an anonymous array is created and used (and therefore the loop is unaffected by modifications to the original array during its execution) as opposed to the original array itself being used during the loop.

Note to self: check copy of PBP to see if this is mentioned.


Find "This signature" for less on Ebay
  • Comment on Re^4: How foreach loops decide what to iterate through

Replies are listed 'Best First'.
Re^5: How foreach loops decide what to iterate through
by ikegami (Patriarch) on Feb 16, 2009 at 02:24 UTC

    an anonymous array is created and used

    An anonymous list, not an anonymous array. (Well, all lists are anonymous.) No array is created.

    Arguments and return values of functions and subs are placed on the stack as a list of scalars.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2022-05-19 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (71 votes). Check out past polls.

    Notices?