Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by sparkyichi (Deacon)
on Dec 08, 2001 at 03:25 UTC ( [id://130353]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://130353]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-26 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found