in reply to private sub routine
I guess you mean "not visible outside current scope"? You could create a reference to an anonymous subroutine and assign it to a lexical variable.