I was always told not to alter the files and directory structure when doing a File::Find. So I do a find pushing the results into a list then after the find is complete I perform my action on the files. Is this silly? The code structure that I use is as follows:
my @file_list; my $file; my $path = "/home/blm/url/"; find (\&wanted, $path); foreach $file (@file_list) { ... } sub wanted{ if (-f) { push @file_list, $_; } }
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |