Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: How foreach loops decide what to iterate through (push array inside foreach)

by ikegami (Patriarch)
on Feb 14, 2009 at 03:14 UTC ( [id://743758]=note: print w/replies, xml ) Need Help??


in reply to Re: How foreach loops decide what to iterate through (push array inside foreach)
in thread How foreach loops decide what to iterate through

Now I am curious as to what perl is doing internally. Can any monks offer a deeper explanation?

I think it iterates over the array instead of putting it on the stack. You can circumvent the optimisation by changing for (@a) to for ((),@a).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-25 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found