in reply to Re^4: Scope, package, and 'my' variablesin thread Scope, package, and 'my' variables
It does declare a new lexical $var over which do_b closes. However, you call the subroutine before the assignment occurs.