sub do_things_with_files { my @files_found; find( sub { if ( ... ) { push @files_found, $File::Find::name; } }, '.' ); }