http://www.perlmonks.org?node_id=341162


in reply to Re: Lexicals in if() scope gotcha!
in thread Lexicals in if() scope gotcha!

Careful with your wording, the variable does go out of "scope" at the end of the "if" block, but the object refrenced by that variable refrences does not neccessarily get garbage collected.

(As opposed to old ANSI C, where the variable itself was still in scope ... oy, those days sucked.)