This morning while trying to answer an SOPW I wanted to give a citatation explaining how to use if...elsif...else. Naturally, I thought of perlsyn, but when I looked there all I could find was the somewhat cryptic if (EXPR) BLOCK elsif (EXPR) BLOCK ... else BLOCK. There was no discussion or comment. (For a direct link to this,see the "here" in BrowserUk's post below).
The only way I found even that was my handy-dandy firefox search button. Conditionals have no section of their own.
It is common in discussions of computer language syntax to have a whole section on conditions. perlsyn has one on loops, but not on conditionals. There doesn't seem to be a separate perldoc on conditionals and the conditional section in perlop only covers expr ? expr : expr syntax.
Is there a reason for this? Is this an oversight? An oversight seems unlikely given the maturity of this documentation and the importance of the syntax. Another place to look?
Thanks in advance, beth
Update: there appears to be a brief example of "if...elsif..else" in perlintro - see post by Anonymous below.
In reply to Where is if...elsif...else documented in perldoc? by ELISHEVA
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |