http://qs1969.pair.com?node_id=130353


in reply to Re: How to find out if X is an element in an array?
in thread How to find out if X is an element in an array?

Is it safer to undef FILE before you reuse it or does it make a difference? I know from a readability standpoint, you might consider using different handles:
open(FILE1, "<$file1") || die "Can't open $file1\n"; open(FILE2, "<$file2") || die "Can't open $file1\n"; open(EMFILE, "<$file3") || die "Can't open $file1\n";
I guess from the efficiency point of view that it would use less memory if you either use the same file handle or undef them after you close the file. Is that true?

Sparky