in reply to subroutine ref while "strict refs"

I think you wanted:

my $perl = do "a.pl";

You're missing the do.

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