Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: What is happening ?

by tilly (Archbishop)
on Aug 19, 2009 at 06:08 UTC ( #789699=note: print w/ replies, xml ) Need Help??


in reply to Re^2:problem using foreach and each with hash ref
in thread problem using foreach and each with hash ref

Yes, executing that loop only called each once. But if after that loop you put a second loop that calls each, then that second loop will get a second pair out of the hash. Or if you try to iterate through with a while/each loop, you'll get every pair except the one already consumed in the for loop.

In other words the hash has been left in a potentially bad state.


Comment on Re^3: What is happening ?
Re^4: What is happening ?
by vinoth.ree (Parson) on Aug 19, 2009 at 06:15 UTC

    OK thanks!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (15)
As of 2014-07-23 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (145 votes), past polls