my @in = grep { !/^\./ && /\.txt$/ } readdir IN; # read all file names from dir except names started with dot