Common Goofs for Novices
The biggest goof of all is forgetting to use
warnings, which identifies many errors. The second biggest goof is
forgetting to use strict when it’s appropriate. These two pragmas can save you hours
of head-banging when your program starts getting bigger. (And it will.)
Yet another faux pas is to forget to consult the online perlfaq.
Suppose you want to find out if Perl has a round function. You might try searching the FAQ
first by searching with perldoc:
% perldoc –q roundApart from those “metagoofs”, there are several kinds of programming traps. Some traps almost everyone falls into, and other traps you’ll fall into only if you come from a particular culture that does things differently. We’ve separated these out in the following sections.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access