my @new; while() { chomp; push @new, $_ if /BRIN|SAGEF403/; } print "new: @new\n";