my $line; while ($line = <>){ print "$.\n" unless ($. % 10000); # to keep track of the progress }