in reply to Problems with map(function, array)
works for me:
DB<121> sub add { $_ + $_[0] } DB<122> map add(2), 1..3 => (3, 4, 5)
> Surprisingly, my new function sometimes works, and sometimes not. Here's the output from that second code fragment:
No surprise, you're deleting @a in the process, please repeat your experiments always with freshly reinitialized input.
Cheers Rolf
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Problems with map(function, array)
by Redei (Initiate) on Dec 10, 2012 at 21:30 UTC | |
by LanX (Saint) on Dec 10, 2012 at 21:38 UTC | |
Re^2: Problems with map(function, array)
by Redei (Initiate) on Dec 10, 2012 at 21:26 UTC | |
by eyepopslikeamosquito (Archbishop) on Dec 10, 2012 at 21:36 UTC | |
by Redei (Initiate) on Dec 12, 2012 at 13:58 UTC | |
by LanX (Saint) on Dec 10, 2012 at 21:30 UTC |
In Section
Seekers of Perl Wisdom