in reply to Re: Counting open files?
in thread Counting open files?

Generally, if you're not affraid of 'outside', you can use proc fs popular in many unices:
opendir(D,"/proc/$$/fd/"); while ($fd=readdir(D)) { print "I've got this descriptor opened: $fd"; };
and then, you could use BrowserUK's POSIX::close to close it;

But this is not very portable, works on linux with procfs mounted, as soon as you move to win32, you're in trouble.

I wanted something working from inside