in reply to Skipping files in a directory
I often use File::Find.
Something like:
use File::Find; find(\&wanted, @directories_to_search); sub wanted { ... } [download]
In the wanted sub you can do the verifications you need.