Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^4: renaming 1000's of FASTA files

by Corion (Pope)
on Jul 11, 2011 at 16:18 UTC ( #913718=note: print w/replies, xml ) Need Help??

in reply to Re^3: renaming 1000's of FASTA files
in thread renaming 1000's of FASTA files

But that's only an issue if you keep the filehandles around, isn't it? You can open lots and lots of files without an explicit close() and I'm not sure where explicitly closing files is better than just having the filehandle get re-opened or fall out of scope:

for (1..100000) { open my $fh, $0; };

Replies are listed 'Best First'.
Re^5: renaming 1000's of FASTA files
by armstd (Friar) on Jul 13, 2011 at 14:26 UTC

    I like explicit closes. I like explicit lots of things that Perl auto-does if given a chance.

    On the maintainability front, an explicit close() tells the maintainer that the author "meant to do that" and "here". No explicit close leaves questions. Did they mean to let it close automagically, or did they leave out the close where they really wanted it, etc.

    I rarely have the luxury of working with expert Perl programmers. The more that's done explicitly and clearly, the better for everyone involved.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://913718]
[hippo]: That was around April 1994. Fun times.
[hippo]: They had purchased some shiny new 486 DXs the year before but crippled them by installing Win 3.1. I demo'd Linux with X on them to the department head and got the go-ahead to wipe Windows and install the new hotness.
[marto]: glory days ;)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2018-06-22 09:51 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.