Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Order in which grep/map receive elements

by afoken (Parson)
on Oct 06, 2012 at 04:37 UTC ( #997576=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    
    is(join(":",grep { $_%2==0 } 1..6),"2:4:6","grep keeps order");
    is(join(":",map { 1+$_ } 1..6),"2:3:4:5:6:7","map keeps order");
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2014-11-22 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (123 votes), past polls