in reply to Re: perl loop counterin thread perl loop counter
Update: I must be drinking the stupid juice today. Ttys are line-buffered, duh.
...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
print "$_ ";
sleep 5 unless $_ % 1000;
#small delay to see buffering effects
print "$_ " ;
print "\n" if /00$/;