while (my $line = ) { if ( ($. % 5000) == 0) { print "Processed $. records\n"; # or, just to let them know # print "."; } ## process away }