Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 perusing the Monastery: (7)
As of 2014-09-16 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (11 votes), past polls