I know that the actually memory is not freed, but that's an implementation detail. The behavior is not like a global. Lexical variables don't retain values when they go out of scope.
I don't think the author was trying to make $q a global. I think the author was trying to fix a closure problem, and "local our" is not as good a solution to that problem as passing the variables to the subs.
In reply to Re^9: OUR declaration
by perrin
in thread OUR declaration
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |