Very minor syntax preference: If I'm looking to exclude files, I generally return from the 'wanted' function, which just reduces the level of indentation in the subroutine. For example:
sub doForEachFile { return if $File::Find::name =~ /\.[oa]$/; #we have what we want...do what ever; }
Does the same thing as your code, just organized a bit differently.
In reply to Re^2: Finding files excluding some
by Nkuvu
in thread Finding files excluding some
by david.paige
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |