sub wanted { if ($File::Find::name !~ /some regex/) { return; } process_file($File::Find::name); }