An example might be nice!

The example that follows the section you cited uses neither else nor elsif. In fact there are no examples using either else or elsif in the document. As for the discussion, it addresses a language design issue (ambiguity) not a usage issue.

Only the most sophisticated readers can comfortably and confidently translate syntax synopsi into working code. That is not something I really felt comfortable doing until I had at least reading knowlege of about 6 different computer languages and studied compilers. I admit that others are probably quicker on the draw than I am, but I think converting syntax descriptions into code without the help of examples is a bit much to ask your average Perl learner.

Unless we are saying that perldoc is only meant for CS majors and self-taught equivalents. Considering that perldoc contains things like perlreftut and perlretut and perltoot, I would hope that perldoc is trying to go beyond internal language discussions.

To quote something BrowserUk said a few months ago when we were discussing new monkquips:

Don't forget you've probably already forgotten, how hard it was to learn what you now take for granted.

The point of this place is not: to force newbies to go through the same pain you had to go through.

Re: I want more monkquips

Best, beth

Update: Many thanks to anonymous below - wish I could upvote a real person. However, having the example far removed from the main place to look for documentation of syntax seems not as helpful as it could be. I didn't consider even looking there because I generally consider that too high level to be of much help. Live and learn.


In reply to Re^2: Where is if...elsif...else documented in perldoc? by ELISHEVA
in thread Where is if...elsif...else documented in perldoc? by ELISHEVA

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.