http://qs321.pair.com?node_id=1187029


in reply to A way to report open file handles a Perl script has open?

Anonymous Monk has answered the immediate question (say my $v=()=`lsof -p $$`), but the following grabbed my attention:
leaking file handles like a sieve
What is the mechanism here? Lexical filehandles generally address this problem, but will obviously linger if you are stashing them in a persistent data structure.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.