http://www.perlmonks.org?node_id=284537


in reply to Re: Re: DBI recipes
in thread DBI recipes

Error checking is an idiom in itself.

Is it? If you were to discuss idiom for reading in a file line-by-line, would you present something like:

open my $fh, "/path/to/file"; while (<$fh>) { chomp; ... }

and dismiss the checking of the return value of open "it being an idiom in itself"? Error checking should be part of the idiom, and not something you bolt on later, when you are more experienced.

Abigail
--
Now that you have passed your driving test, let me introduce you to the function of safety belts.