my @dots = grep { /^\./ } readdir(DIR); #### my @not_dots = grep { !/^\./ } readdir(DIR);