http://qs321.pair.com?node_id=213873


in reply to Lexical scoping like a fox

The big nit here is about destruction. Lexicals are not always destroyed when their declaring scope exits. If they were then closures wouldn't work, and neither would returning references to lexicals. While I know what you mean, it's important to describe what happens correctly. (Cheat and say that when a scope exits perl cleans up any variables that aren't otherwise in use)

Touching on the subject of recursion is important as well. It's easy enough to read this as if there were only one set of variables for a block, and each time you enter the block you get the same set over again, which isn't the case.

You don't necesarily have to go into detail on either of these, but it's important to make sure you don't give folks a mistaken impression that'll get in their way when they hit the more complex stuff later.

Other than that, this is pretty good.