http://qs321.pair.com?node_id=754268


in reply to Re: Finding files excluding some
in thread Finding files excluding some

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.