in reply to Counting open files?

You could try lowering the resource limit of open files at startup with ulimit or [gs]etrlimit (pity I don't know the perl interface for these), then, just before you reexec, raise the limit to the original value. It'd probably be enough to lower the limit by a little, as you probably need only few filedescriptors to reexec the program.