There's more than one way to do things | |
PerlMonks |
Re^2: converting from switch to given-whenby tobyink (Canon) |
on Sep 25, 2012 at 06:05 UTC ( [id://995490]=note: print w/replies, xml ) | Need Help?? |
Indeed. If they were proper constants (e.g. defined by constant) then they'd work with given/when. But they are not. :-(
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
|
|