Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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 taking refuge in the Monastery: (4)
As of 2016-02-09 04:02 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (300 votes), past polls