Exceptions suffer exceptions :), for instance for programs that mustn't die whatever happensIn which case the top level of the program needs to be running inside an eval{...} anyway, to protect it from intrinsic exceptions like divide-by-zero or call-on-missing-method. So exceptions are still okay, as they'll always be caught.
And concerning the 8th perl coding practice: could you explain it a bit?Sure, but an adequate explanation is about 30 pages long. Which is why I put it in a handy book, very soon to be available from most good bookstores. ;-)
Briefly, always using /x allows you to set out regexes readably, and to comment them. Always using /ms makes Perl regexes work the way most people expect them to work, and prevents very subtle edge-case errors. Using \A and \z is essential for saying what you mean under /m (which you'll always be using).
In reply to Re^4: Perl Best Practices
by TheDamian
in thread Perl Best Practices
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |