my $line; while ($line = <>){ print "$.\n" unless ($. % 10000); # to keep track of the progress } #### my $in = FileHandle->new($ARGV[0]); my $line; while ($line = $in->getline){ print "$.\n" unless ($. % 10000); } #### use IO::All; my $in = io($ARGV[0]); my $line; while ($line = $in->getline){ print "$.\n" unless ($. % 10000); }