in reply to Shell script with PERL

That's quite a vague question. Perhaps you're looking for the system function.

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