P is for Practical | |
PerlMonks |
Re: Having a problem creating a hash with the map functionby tobyink (Canon) |
on Nov 29, 2012 at 17:05 UTC ( [id://1006306]=note: print w/replies, xml ) | Need Help?? |
Well, the contents of your map block indicate that you don't understand map much. It needs to return something (but cannot use the return keyword!). You have the for loop as the last statement in the block, which returns undef.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom
|
|