Just another Perl shrine | |
PerlMonks |
Re^3: Hash assignments using mapby graff (Chancellor) |
on Feb 24, 2007 at 22:45 UTC ( [id://601928]=note: print w/replies, xml ) | Need Help?? |
... I thought I could do the same thing using map ... The way to do that with map would be like this:
The point is that, in this case, you want each iteration in map to return a key/value pair, not just a single value, and the "fat comma" (=>) does that for you.
In Section
Seekers of Perl Wisdom
|
|