my @array = find(\&collect_file, $dirphoto); for (@array) { print "$_
"; } } sub collect_file { my @array; push (@array, $File::Find::name); }