use strict; use warnings; while () { next unless /\S/; my @c = split; my $p = 0.7 * $c[2]; print if ($c[4] - $c[3] > $p) } __DATA__ aa 22 310 1 300 ab 40 200 2 228 ac 51 230 10 241 df 23 240 22 242 ef 34 370 24 282 gh 24 125 22 210 df 76 290 11 232 wq 13 170 20 180 ss 89 288 12 270 #### aa 22 310 1 300 ab 40 200 2 228 ac 51 230 10 241 df 23 240 22 242 gh 24 125 22 210 df 76 290 11 232 wq 13 170 20 180 ss 89 288 12 270