Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by LanX (Bishop)
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008167]
help
Chatterbox?
[Petroza]: yes I'll do that. instead of the url I'll write "link"
[LanX]: darn my pc is restarting for updates

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2017-10-17 15:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (233 votes). Check out past polls.

    Notices?