Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 imbibing at the Monastery: (8)
As of 2014-12-21 09:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (104 votes), past polls