v-- what's that @? my @files = grep(/ap|ck_hm1_111/, @readdir(DIR)) #### my @files = grep /(?:ap|ck)_hm1_111/, sort { lc $a cmp lc $b } readdir(DIR);