in reply to Re: Perl Object Initilization
in thread Perl Object Initilization

1) # my $FHOUT = shift || "STDOUT";

Granted for some reason this: # my $FHOUT = shift || "STDOUT"; # print $FHOUT $self->{'a'} . "\n"; doesn't work as expected ...)

"STDOUT" and "GOBBLEDYGOOK" are essentially equivalent: they are both strings--not filehandles.

2)...and finally, how about destroying objects? according to perlobj, objects are destroyed automagically when they go out of scop, but what if I want to destroy them manually? as far as I can tell, calling a method DESTROY does not automatically destroy it... Is there even any reason to cleanup after your objects?

There can be. If you have file handles or database connections you want to close. Or if you merely want to know when your objects are destroyed, you can print out a message. There are also more advanced reasons for calling DESTROY:

see here

perl calls DESTROY for you--just before perl is going to destroy the object. If you don't have a specific reason for defining a DESTROY method, then don't. perl will usually take care of everything for you.