But my intuition (which is apparently incorrect) says that sub get_count is redefined each time executing this blockNo, named subs are only created once, during compilation. Anonymous subs are created each time you ask for one to be created. The lexical capture happens at creation time.
Dave.
In reply to Re^3: static storage in a local subroutine?
by dave_the_m
in thread static storage in a local subroutine?
by Moron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |