Monks,
I was recently bit by the "Too many open files" error while doing a lot of file operations via a Perl script.
After (several hundred or thousand) file handles had been opened (and not closed), my program would just crash.
Sure - now I've fixed the problem, but it would be nice to add a unit test to check for dangling open file handles. A quick search on CPAN didn't produce anything, and without resorting to tricks like $open_filehandles = `/usr/sbin/lsof -p $$ | wc -l` I'd like to know how to do this in Perl.
Ideas?
In reply to How to test for open file handles? by jdrago_999
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |