use strict; use warnings; while (my $line = ) { my @cols = split /,/, $line; my @third = split /\./, $cols[2]; print $line if @third < 3; }