in reply to Need object to retain open filehandle.
Don't use prototypes. Not on methods and not on non-methods. There may be exceptions to this rule, but you won't stumble across them for a long time.
Your DESTROY method is calling Close using a non-method call. Do
instead. Or just get rid of DESTROY altogether: perl will close the file for you when the object goes out of scope; the only reason to manually do it would be to take some action when close() gives an error.my $self = shift; $self->Close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Need object to retain open filehandle.
by exodist (Monk) on Jul 02, 2007 at 04:50 UTC | |
by ysth (Canon) on Jul 02, 2007 at 05:03 UTC |