Problems? Is your data what you think it is? | |
PerlMonks |
Re: using pop and shift to find the sum of an arrayby tobyink (Canon) |
on Sep 22, 2012 at 10:52 UTC ( [id://995087]=note: print w/replies, xml ) | Need Help?? |
The usual and most readable way is this:
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
|
|