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

Re: Order in which grep/map receive elements

by BrowserUk (Pope)
on Oct 05, 2012 at 11:54 UTC ( #997454=note: print w/ replies, xml ) Need Help??


in reply to Order in which grep/map receive elements

I could not find that this is directly stated ...

You didn't look very hard. In the third reply to the post you quote it say "That method preserves the order of the original array ".


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.

RIP Neil Armstrong


Comment on Re: Order in which grep/map receive elements
Re^2: Order in which grep/map receive elements
by abufct (Initiate) on Oct 05, 2012 at 11:58 UTC
    Yes, thank you. I've seen this, but I didn't find any reference to documentation that supports this statement.

      Probably because it is considered too obvious require documentation.

      Things come out of map/grep in the same order they went in.

      With the single exception of when grep removes item(s) from the stream, in which case those things that do come out, do so in the same relative ordering with which they went in.


      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.

      RIP Neil Armstrong

        ok, thanks a lot! i've decided to use List::MoreUtils 'uniq', which explicitly states what I want (and uses exactly the same code I've cited in my first post).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-12-20 08:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls