My tendency is to the first construct when COND is true or false based on an option contained in the argument list and the third when COND is true or false based on improper inputs, e.g., such as log(0) or on external factors (the network is down).
I find the second case unesthetic, as the die statement is, at best, superfluous. Indeed, I would not be surprised if Perl optimized it away.
emc
" When in doubt, use brute force." — Ken ThompsonIn reply to Re: if else and not reachable coding style
by swampyankee
in thread if else and not reachable coding style
by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |