As already mentioned, this is a OS limit, not a Perl limit. Programmers of all creeds have been encountering the joys of hitting filehandle ceilings for years.
in reply to FIlehandle Limit
In fact, this is such a common problem for heavily used proxies that there's an entire section of the squid FAQ devoted to how to increase your filehandle limit.
Head on over to the squid FAQ (Troubleshooting) and scroll down to section 10.4 (Running out of filedescriptors). It covers how to solve the problem on a variety of UNIX-flavoured operating systems.
Perl Training Australia