There's the little known but core FileCache that will handle closing and reopening descriptors for you to keep you under the per-process handle limits.

And yes, some versions of Solaris had a pitifully low file descriptor limit if you were using the C library's stdio.h functions (or anything sitting on top of them rather than system calls such as read(2) and friends). I think basically someone declared the descriptor as a char rather than an int so even if you upped the ulimits you'd get bitten at 252-ish descriptors. That being said, I think this was aeons ago in the 2.4-2.6 era and was fixed maybe around 2.7-2.8. Solaris 9 didn't have the problem at all that I recall.

Update: clarified bit about what had problems.


In reply to Re: Writing to many (>1000) files at once by Fletch
in thread Writing to many (>1000) files at once by suaveant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.