good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: File::Find Questionby jkeenan1 (Deacon) |
on Oct 31, 2013 at 01:51 UTC ( [id://1060494]=note: print w/replies, xml ) | Need Help?? |
Your code is in severe need of simplification and cleanup before we can consider whether using File::Find would improve it.
For example, write off the bat I detected three variables which are declared but never used: Get rid of them -- and while you're removing them, also delete all the commented-out code, which only serves as a distraction to those reading your post and trying to help you. Next, note that on line 56 you assign $drive to $dirlist[0], and then within five lines you call for a loop over the contents of @dirlist. If you only have one entry in the list over which you are iterating, you can ditch the for loop as well. Thank you very much.
Jim Keenan
In Section
Seekers of Perl Wisdom
|
|