Think about Loose Coupling | |
PerlMonks |
Re^3: @array elements multiplication with another array elements.by tobyink (Canon) |
on Oct 31, 2012 at 07:51 UTC ( [id://1001621]=note: print w/replies, xml ) | Need Help?? |
It uses a prototype of &\@\@. That means the two arrays get implicitly turned into arrayrefs by the Perl parser. The body of the sub just sees a coderef and two arrayrefs - not a flattened list. See perlsub.
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
|
|