in reply to Opine on multiple open filehandles vs. multiple loops through data
For any halfway decent modern OS (or even Windows for that matter . . .) 36 open files should be no problem. The size of the file itself doesn't enter into the equation since all filehandles are underneath is (more or less) a few pointers; the storage requirements for one are miniscule. Granted if you were talking about several more orders of magnitude (thousands of handles) you might run into problems and need to look at something like FileCache, but for this many it shouldn't be a problem.
Update: Oop I didn't even think about it (stayed up too late running SM 4-man last night . . . :), but as is pointed out below each file should already be sorted so you just read until the date changes and then open the new output file. Now if you had multiple files you wanted to merge (say from n separate webservers) into one consolidated log file you would need multiple open files for reading, but again just one output file would serve.
|
|---|