[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] line buffering in perl5



I notice that the mpw tool now seems to line buffer STDOUT, whereas
the perl4 seemed to buffer on a larger blocksize.

For instance:
        perl -e 'for ($i = 0; $i < 100; $i++) { print "$i\n"; }'

is way slow, what with mpw scrolling on each line, but my old perl4 binary:

        perl4.68k -e 'for ($i = 0; $i < 100; $i++) { print "$i\n"; }'

does it way quick.

Setting $| = 0 has no effect, as you might expect.  'perl xxx | catenate'
can work around the problem, but I was wondering if there is a 
better solution?

--ed