note
haukex
<blockquote><i>
But if I try with slightly changed line:
<c>
perlbrew exec perl -wle 'print " A" x 1e0 for 1 .. 1e2' | less -S
</c>
There is no warning, although I didn't scroll the whole output.
</i></blockquote>
<p><c>perl -wle 'print " A" x 1e0 for 1 .. 1e2'</c> is 300 bytes, while <c>perl -wle 'print " A" x 1e3 for 1 .. 1e2'</c> is 200100 bytes. Since you're piping the output of <c>perl</c> to another program, <c>perl</c>'s output isn't line-based (see e.g. [https://perl.plover.com/FAQs/Buffering.html|Suffering from Buffering]), and so what I'm fairly certain is happening is that <c>perl</c> is simply outputting the 300 bytes in one go. <small><i>Update:</i></small> Because <c>perl -wle '$|++; print " A" x 1e0 for 1 .. 1e2'</c> isn't killed by <c>SIGPIPE</c> either, it may also have something to do with how much data a pipe can buffer, but I'm not an expert on that.</p>
11129654
11129658