Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

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

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

in reply to Re^2: Problems with map(function, array)
in thread Problems with map(function, array)

the LIST elements are ALWAYS passed via $_ per iteration.

you call twice w/o parameters so $_[0] is undef and undef*2 == 0!

take again a look at my "add"-example to distiguish between parameters and iteration value

Cheers Rolf

Comment on Re^3: Problems with map(function, array)
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008167]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2015-11-29 11:03 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 (750 votes), past polls