in reply to Inner subroutines?

Well, you would never use that particular technique, because if you take inner_sub and paste it outside of outer_sub, it behaves the exact same way.

What you're thinking of are closures, see Tutorials: Closure on Closures, Creating Nested Functions