in reply to Inner subroutines?
What you're thinking of are closures, see Tutorials: Closure on Closures, Creating Nested Functions