in reply to Re^3: print inside a loop
in thread print inside a loop

AFAIK, since the advent of PerlIO (which almost all perls are compiled/configured for these days), Perl chooses itself between block- or line-buffered, and you can only select unbuffered vs. the other two (with $|).

In earlier versions of Perl, when stdio (C runtime lib) was used by default, you could use setvbuf (via IO::Handle) to set buffering mode and buffer size.

These days, you usually get:

$ perl -MIO::Handle -e 'STDOUT->setvbuf($buf, _IOLBF, 2**16)' IO::Handle::setvbuf not implemented on this architecture at -e line 1.