It is quite usual for a new comer to the Perl world being confused by closure, so don't be too frustrated ;-)
Closure is something nice to know, so you can recognize it next time. But in general, you should avoid it, as it breaks your lexical scope. You want to code in a clear way, not a confusing way ;-) I guess you learned more than just closure, if you think about it more.
In reply to Re^3: Confused scoping while using File::Find
by pg
in thread Confused scoping while using File::Find
by rongoral
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |