@files = grep /^(\d+\D\d)_(LacZ|pgK|SD|SU)(.*)$/,@files; # is not doing what you think