use strict; use warnings; use feature 'say'; my @col9 = map { (split)[8] } ; foreach my $test ( 1, 9, 42, 666 ) { my $count = scalar grep { $_ >= $test } @col9; say sprintf "%d values were >= %d", $count, $test; } __DATA__ 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 42 10 11 12 1 2 3 4 5 6 7 8 42 10 11 12 1 2 3 4 5 6 7 8 42 10 11 12 1 2 3 4 5 6 7 8 1 10 11 12