Your first option sounds optimal to me, although only benchmarking can prove it one way or another. 36 filehandles should be no problem and it shouldn't matter how much data you write to them.
-sam
Comment on Re: Opine on multiple open filehandles vs. multiple loops through data