for (@ary) { print if m/\s(\d+)%/ and $1 >= 90; } # as a one liner perl -ne 'print if m/\s(\d+)%/ and $1 >= 90' infile > outfile