Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Problems with map(function, array)

by Redei (Initiate)
on Dec 10, 2012 at 21:00 UTC ( #1008163=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub my_uc {
        my $c = shift;
    ...
    
    @a = map my_uc, @a;
    print "==>@a<== my_uc,\n";
    
  2. or download this
    ==>A B C<== { uc($_) }
    ==>A B C<== { my_uc($_) }
    ==>A B C<== uc,
    ==>  <== my_uc,
    
  3. or download this
    sub my_new_uc {
        my $c = shift // $_;
    ...
    
    @a = map my_new_uc, @a;
    print "==>@a<== my_new_uc,\n";
    
  4. or download this
    ==>A B C<== my_new_uc,
    ==>  <== my_uc,
    ==>  <== my_new_uc,
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2016-05-04 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?