I have an array that contains one reference per item. I need to clean up the things referenced by those references So.. 1) Am I doing this correctly? 2) am I doing the CODE,IO correct 3) any other refs I'm overlooking?
for(@references_to_kill) {
undef ${$_} if ref($_) eq 'SCALAR';
undef @{$_} if ref($_) eq 'ARRAY';
undef %{$_} if ref($_) eq 'HASH';
undef *{$_} if ref($_) eq 'GLOB';
undef &{$_} if ref($_) eq 'CODE'; # is this right??
close $_ if ref($_) eq 'IO'; # is this right, what if it was never opened? How can I check that?
# any others,
}
TIA Lee.M- JupiterHost.Net
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>