use warnings; use strict; open TAB, '<', 'test.txt' or die "Can not open file: $!"; my $seed = 1.04; while () { chomp; my @tab = split / /; my $diff = $tab[0] - $seed; if ($diff >= 0.1) { print "tab[0]=$tab[0]\n"; $seed = $tab[0]; } } close TAB;