in reply to Scalar Value Not Available To Subroutine

It seems that $uid should be visible and defined in the sub. The lexical scope of the $uid variable ought to cover the sub, and the dynamic scope of the loop should cover the calls to the sub. Odd; I can't say I exactly understand what's happening here.

Works if you do our $uid though.

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