in reply to Re^2: perl loop counter
in thread perl loop counter
...it won't be buffered
Actually, STDOUT is line buffered by default when connected to a tty, i.e. - as zentara said - output will be written either upon encountering a newline, or when the buffer has filled up (or when the program terminates, and the buffer gets flushed).
Try playing with something like
for (1..3000){ print "$_ "; sleep 5 unless $_ % 1000; }
|
|---|