|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re: Can't use string blah as an ARRAY refby tobyink (Monsignor) |
| on Jul 30, 2012 at 07:37 UTC ( #984378=note: print w/ replies, xml ) | Need Help?? |
|
Are you trying to get a count of how many items there are in @_?
If you are confused about the exact meaning of the error message, it's this...
I think what you wanted was $#_.
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
|
|
||||||||||||||||||||||