Jeff Pang wrote:
>
On Nov 16, 2007 6:19 PM, John W. Krahn <[EMAIL PROTECTED]> wrote:

You should *always* check the return value of system functions like
open(), flock(), seek(), chdir(), unlink(), etc.

Thanks John. I know it's good to check the return value at those places.
But I don't think it's so valueable work. b/c when you
open,flock,unlink a file unsuccessfully, it's most likely a system
problem, not the perl program's probrom.

The point of checking the return status is /because/ the problem is out
of Perl's control. If you ignore a failed open then your program is
likely to fail ungracefully later on when it tries to use an unopened
file handle. If a failed lock is ignored then you also run the risk of
corrupting shared data or causing other software to crash.

Rob

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to