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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||