To be honest, I have no idea what the diamond operator is doing behind the scenes (How much does it read at a time internally?), I would think there might be potentially some benefit to chunking it into an array. Not the whole thing of course but perhaps 100-500 records at a time. (It all depends I suppose on what buffer sizes IO is working with internally)
-Lee
"To be civilized is to deny one's nature."
Comment on Re: Re: Formatting a large number of records
IO::Handle appears to allow access to setbuf() and setvbuf(). From the perldoc:
If the C functions setbuf() and/or setvbuf() are available, then "IO::Handle::setbuf" and "IO::Handle::setvbuf" set the buffering policy for an IO::Handle. The calling sequences for the Perl functions are the same as their C counterparts--including the constants "_IOFBF", "_IOLBF", and "_IONBF" for setvbuf()--except that the buffer parameter specifies a scalar variable to use as a buffer. You should only change the buffer before any I/O, or immediately after calling flush.