foreach my $file (`find $dir -type f -name "*.txt"`)