use File::Find; find( sub { push @files, $File::Find::name if -f && /mail.log.*/ }, '.');