Skeeve has asked for the wisdom of the Perl Monks concerning the following question:
I'm asking myself how to not use global variables for File::Find.
Currently my finds look like this:
So I push into the global variable, but I don't really like this. I'd love to have local variables here. Is there an easy solution to it I haven't thought of yet?my @files; find( sub { push( @files, $_ ); }, @my_directories );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File::Find and non global Variables
by Corion (Patriarch) on Jul 20, 2006 at 09:48 UTC | |
|
Re: File::Find and non global Variables
by Ovid (Cardinal) on Jul 20, 2006 at 09:54 UTC | |
|
Re: File::Find and non global Variables
by davorg (Chancellor) on Jul 20, 2006 at 09:57 UTC | |
|
Re: File::Find and non global Variables
by Tanktalus (Canon) on Jul 20, 2006 at 13:55 UTC |