If you were to use IO::File, you will find that the object that you get for the filehandle has a method available called autoflush(). This will set that property on the filehandle. Also, in your DESTROY method for your log class, you can simply undef the object reference, and let its own DESTROY method handle the closing of the file and the requisite clean-up.
--rjray
In reply to Re: Re: Do I need local $
by rjray
in thread Do I need local $
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |