laziness, impatience, and hubris | |
PerlMonks |
Re: How does map work?by LanX (Saint) |
on Oct 26, 2013 at 20:21 UTC ( [id://1059840]=note: print w/replies, xml ) | Need Help?? |
$_ does not belong to @_, you have to set this global variable explicitly and not pass it. Eg by changing while to for (another bug in your code btw is to think that while automatically sets $_) Im pretty sure HOP already shows how to emulate map! Sorry no code am typing on my mobile... :-)
Cheers Rolf ( addicted to the Perl Programming Language)
In Section
Seekers of Perl Wisdom
|
|