Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Breaking The Rulesby GrandFather (Saint) |
on May 30, 2006 at 19:55 UTC ( [id://552617]=note: print w/replies, xml ) | Need Help?? |
Many of the so called rules are actually guides set out to make your life longer and happier. Sure, you can parse HTML, CSV, ... whatever with regexes. You can write your own regex engine if you want. You'll learn a great deal about regexen, but with respect to your primary goal of parsing some HTML, you are liable to spend a lot of time, encounter a lot of unhappieness and possibly not get the job done. You don't have to use strictures, but they cost almost nothing and save bulk time. "use strictures" is a guide, but it should have the status of a rule. There are very few times in modern Perl where strictures are "bad", but almost every line of code written benefits from having them turned on. All the rules (or guides) are of greatest benefit to those who don't understand them or don't understand why they should be followed. So, if you don't understand a rule, follow it! In summary, don't blindly follow the rules. Follow the rules because we say so, but ask us why the rules are as they are. Understanding why is as important as following the rules, but follow the rules until you know deep in your waters why the rule is there. DWIM is Perl's answer to Gödel
In Section
Meditations
|
|