in reply to Re: File:find tutorial/introduction
in thread File:find tutorial/introduction

but it has the advantage of a very simple callback.

I wouldn't call
my @found; find(sub { push @found, $File::Find::name; }, @directories); for (@found) { next if !check($_); ... }
simpler (or more complex) than
my @found; find(sub { push @found, $File::Find::name if check($File::Find::name); + }, @directories); for (@found) { ... }

The disadvantage of the former approach is that you only have access to the fully qualified name without doing extra work. If you think that's not an issue, you might as well use cleaner File::Find::Rule.

Update: Added "not" in "If you think that's not an issue". Oops!