in reply to Re^8: OUR declaration
in thread OUR declaration
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: OUR declaration
by ikegami (Patriarch) on Sep 25, 2006 at 16:56 UTC | |
by perrin (Chancellor) on Sep 25, 2006 at 17:49 UTC |