I am using perl to find some kml files in a directory. The files are located in
/Data/######/.
Where ###### is a 6 digit number.
All of the kmls are the same 6 digit number of whatever folder it was in …
/Data/######/######_REP.kml
The problem is I have another folder
/Data/QC/######/
with the same kmls in it as well. I want to ignore anything thats in that QC folder from my search.
My Code:
sub repmatch{
Push(@filelist,$File::Find::name) if ($File::Find::name =~ m\d{6}\/\d{6}_REP.kml$/)
}
find(\&repmatch,$dir) # $dir is my directory I passed in
in the repmatch subroutine, add (before push):
That should solve it.