...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; }
In reply to Re^3: perl loop counter
by almut
in thread perl loop counter
by cutlass2006
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |