Um - @files isn't a global variable. It's a lexical variable as it is defined with my. The anonymous sub that you're passing to find is closed on the lexical @files. Thus, your example already is how to avoid using globals with File::Find.
In reply to Re: File::Find and non global Variables
by Tanktalus
in thread File::Find and non global Variables
by Skeeve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |