"be consistent" | |
PerlMonks |
Re: [Soved] Re^2: File::Find - Traverse the first level directories from starting point - How?by 1nickt (Canon) |
on May 19, 2020 at 05:47 UTC ( [id://11116925]=note: print w/replies, xml ) | Need Help?? |
Great, thanks for the feedback! A slightly more idiomatic way of writing your code:
Note that your code reads the names of all the files (plain files and directories) into two different variables; also I'm not sure about the regexp, it's not clear from your comment what names you are wanting to skip. The file/dir name at that point in the loop shouldn't have a leading slash IIUC. Hope this helps! Update: s/all the files/names of all the files/ thx soonix
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|