Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2015-11-26 14:31 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (701 votes), past polls