in reply to Typeover output

l8on,

Another trick is to use the modulus operator (%) to only print every 100th, 1000th, etc., line number:

YuckFoo

#!/usr/bin/perl $|++; for my $i (0..10000000) { $i % 100000 or print "line: $i\r"; }

Replies are listed 'Best First'.
Re^2: Typeover output
by L8on (Acolyte) on Jan 14, 2005 at 13:02 UTC
    Thanx everyone. I knew that I should've been able to do it, but couldn't figure it out.

    And to quote a classic:
    "Now I know, and knowing.... is half the battle."


    Thanx again, L8on