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


in reply to Re^2: a sub within a sub -- revisiting
in thread a sub within a sub -- revisiting

The provided code is actually visually very helpful, as it leads (mind you, leads, not misleads) the reader to think that bar() makes sense in the context of foo().

Maybe that code documents that its author intended such a thing, but to an experienced Perl programmer, I suspect that the code instead reads as if the author doesn't know how lexicals and sub declarations work in Perl.