|There's more than one way to do things|
Searching for files efficiently help!by Anonymous Monk
|on Nov 16, 2011 at 15:31 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
The values in the array @files will have the file name attached to its path, like: /var/www/loc/file/subdir/1234567_bc_20101000.txt /var/www/loc/file/tree/text/1234567_bc_20101005.txt.
I need to match against the file names in the array @filelist, reported it and eventually delete from the $startdir.
I can get what I want as it is, but my question is about efficiency and speed since the array @filelist can be really large and the directory structure in $startdir is really large and complex.
Is there a better way to accomplish this than what I have here?
I wonder on the nested foreach loops I have on the code, any suggestions would be very helpful.
Thank you very much for looking!!!