http://www.perlmonks.org?node_id=1029384

ISAI student has asked for the wisdom of the Perl Monks concerning the following question:

Hello all. We are seeing cases of slowdown when printing out files (our fileserver could be better).

I was wondering if there is any real difference between printing line by line vs. flushing out 1 big array, or multiline string. Right now, the scipts print out line by line. You can assume that the system's memory can handle it. Or in code:

... print FH $f; ... print FH $b; ...
vs.:
... $printout .= $f; ... $printout .= $b; ... print FH $printout
Thanks.