http://qs321.pair.com?node_id=693249

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

Hi, I have a situation where I have to write to 30,000 simultaneous files based on the contents of X files. So I open the file:
open ${fileno}, ">>$filename";
I write to the file:
printf ${fileno} "%s\n", $myline;
The problem is - with so many simultaneous writes going to many different files my disks are thrashing. So what I want to do is increase the write buffer per file handle, and only flush when I either fill that buffer or have X lines in the buffer.