|
|
| more useful options | |
| PerlMonks |
Re: Perl replacement for choice.comby Tux (Prior) |
| on Mar 03, 2013 at 11:03 UTC ( #1021493=note: print w/ replies, xml ) | Need Help?? |
|
You ran into a pet peeve of mine (at least twice in presented code): There shall be no else after leaving enclosing scope (exit, die, return, last …) When using if … else …, the code after that is to be executed always, that is why you have if/else. If however the first part ENDs with an exit of the enclosing scope, there is no need whatsoever for the else. Removing else, the braces and the indent, make the code easier to read and maintain.
See for slides from a talk here and here/here:
Enjoy, Have FUN! H.Merijn
In Section
Cool Uses for Perl
|
|
||||||||||||||||||||||||||||||