Don't ask to ask, just ask | |
PerlMonks |
Re^2: converting from switch to given-whenby tobyink (Canon) |
on Sep 26, 2012 at 08:48 UTC ( [id://995730]=note: print w/replies, xml ) | Need Help?? |
Precisely. Smartmatch is easy. (Except when it isn't.)
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
|
|