Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^5: Is it safe to append to the array you are iterating over

by BrowserUk (Pope)
on Mar 15, 2013 at 04:00 UTC ( #1023612=note: print w/replies, xml ) Need Help??


in reply to Re^4: Is it safe to append to the array you are iterating over
in thread Is it safe to append to the array you are iterating over

So reject the idea that there are better ways to do it; but decided to change the way you do it anyway. That's ...


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^5: Is it safe to append to the array you are iterating over

Replies are listed 'Best First'.
Re^6: Is it safe to append to the array you are iterating over
by Anonymous Monk on Mar 15, 2013 at 14:15 UTC

    The simplest and most straightforward way is to append to the array and let it run until it is done. However unlikely it is to be broken, there is no guarantee that will continue to work.

    A safer solution was chosen instead. A fairly small reduction in simplicity for the warm fuzzies of safety.

    Which one is "better" is at this point matter of opinion. In one sense the final choice was deemed best because it was the final choice. In another sense, the original was best (aside from being disqualified on a technicality). In the same sense that a runner can be fastest but not win.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1023612]
help
Chatterbox?
[cbeckley]: I have a functioning module I use to spawn sets of commands across multiple servers.
[cbeckley]: It's nascent, and probably looks like baby Perl to the veterans.
[cbeckley]: I have several questions about it's future development. But it seems like a lot of code to put in a sopw.
[cbeckley]: Should I put the module and example calling code in cufp, and then ask questions in sopw?

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2017-03-24 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (304 votes). Check out past polls.