foreach (grep { !/^\.\.?$/ } readdir(PRINT)) { # stuff }