>>>>> ""lists" == "lists user" <[EMAIL PROTECTED]> writes:
"lists> When destructing a variable,one can say `$var = ''` or `$var = "lists> undef`,which way is good? "lists> like two cases follow, "lists> sub DESTROY "lists> { "lists> my $self = shift; "lists> $self->{array} = undef; "lists> } "lists> or "lists> sub DESTROY "lists> { "lists> my $self = shift; "lists> $self->{array} = ''; "lists> } Neither of those. In DESTROY, your object is about to die anyway, so any items contained in the hashref of your object will also lose one reference, making your attempt to change that completely moot. Did you see somewhere that you need to do your own hash element clearing (like a bad website or book)? Or is this leftover inappropriate knowledge from other languages? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/