The first argument to
find() is either a hash
reference describing the operations to be performed for each file, or a
code reference. If it is a hash reference, then the value for the key wanted should be a code reference. This code reference is called the wanted()
function below.

Currently the only other supported key for the above hash is
bydepth, in presense of which the walk over directories is performed depth-first. Entry point
finddepth() is a shortcut for specifying
{ bydepth = 1}> in the first argument of
find().

The
wanted() function does
whatever verifications you want. $File::Find::dir contains the current
directory name, and $_ the current filename within that
directory. $File::Find::name contains
"$File::Find::dir/$_". You are
chdir()'d to
$File::Find::dir when the function is called. The function may set
$File::Find::prune to prune the tree.

File::Find assumes that you don't alter the $_ variable. If
you do then make sure you return it to its original value before exiting
your function.