Without reading the rest of your post:
next if($name =~ /[^\.]|[^\.\.]/g);

I think this might work better:

return if ($_ eq '.' || $_ eq '..');

In reply to Re: File::Find finding . and .. by moritz
in thread File::Find finding . and .. by transiency

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":