Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 ( #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? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2023-03-27 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (63 votes). Check out past polls.

    Notices?