Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Is it safe to append to the array you are iterating over (yes)

by DrWhy (Chaplain)
on Mar 15, 2013 at 22:39 UTC ( [id://1023788]=note: print w/replies, xml ) Need Help??


in reply to Re: Is it safe to append to the array you are iterating over (yes)
in thread Is it safe to append to the array you are iterating over

I wouldn't be surprised now if even splice might not confuse the loop as long as you are splicing parts of the array that the loop iterator hasn't reached yet.

--DrWhy

"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

  • Comment on Re^2: Is it safe to append to the array you are iterating over (yes)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2025-02-08 22:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (95 votes). Check out past polls.