George P. wrote:

> I noticed that you've said
> "open () or die()"
> and
> "close() or die()"
> 
> If open fails, the program will kill itself, so the close function
> will never be called.
> Therefore there is no need to say "close() or die()"

not true.

> You've done it thrice in this email, so I'm presuming
> that it's a habitual thing.
> 
> Putting it won't hurt, but it's not useful either.
> 
> Just thought I should point it out :)


The simple answer is: Good programming practice. 

What if something happens to the file before I'm able to close the 
filehandle? 

This has implications beyond the simple example shown here, and consequently 
I've made it a force of habit to always check success of certain operations 
as a matter of course. 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to