in reply to File::Find and non global Variables

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.

  • Comment on Re: File::Find and non global Variables