or download this
(W closure) An inner (nested) named subroutine is referencing a
lexical variable defined in an outer named subroutine.
...
reference variables in outer subroutines are created, they
are automatically rebound to the current values of such variables.