use IO::All; my $in = io($ARGV[0]); my $line; while ($line = $in->getline){ print "$.\n" unless ($. % 10000); }