Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Problems with map(function, array)

by eyepopslikeamosquito (Chancellor)
on Dec 10, 2012 at 21:36 UTC ( #1008169=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    sub twice { 2 * $_[0] }
    my @a = map twice, 1..3;
    print "@a\n";
    
  2. or download this
    use strict;
    use warnings;
    sub twice { 2 * $_[0] }
    my @a = map twice($_), 1..3;
    print "@a\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008169]
help
Chatterbox?
and nobody stirs...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2016-12-10 23:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (168 votes). Check out past polls.