use File::Find; my @found_files; find( sub { push @found_files, $File::Find::name }, $directory );