in reply to Re: Array indexing and string manipulation
in thread Array indexing and string manipulation

This is quite a nice technique. It's worth pointing out though, that it has a side-effect of dismantling @array, so you should make a copy of @array first if you were planning on using the array again.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'