----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, January 29, 2006 8:37 PM
Subject: Re : How can I get a list of the file handles that my
perlapplication?


 I am looking for a way to programmatically get the list of file handles
and their properties from inside my application.  My application seems to
be leaking file handles, so I would like to print them out periodically in
an attempt to determine where the leak is.  I have done the obvious of
matching up the opens and closes but this has not turned anything up.

 The debugger is able to print them out, so I figure my app should be able
to do it as well.

The debuger is able to print out file handles because the debuger remeber
all file handle numbers ;-)
If you want to do something similar you must use some like this

open(HANDLE1, ">some_file_or_pipe") or die "Can't open HANDLE1";
...
close(HANDLE1) or die "Can't close HANDLE1";

Instead of "die" you can use "print" if you can to continue program run.

Petr Vileta, Czech republic
(My server reject all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to