in reply to Re: Where is if...elsif...else documented in perldoc?
in thread Where is if...elsif...else documented in perldoc?

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.

Replies are listed 'Best First'.
Re^3: Where is if...elsif...else documented in perldoc?
by BrowserUk (Patriarch) on Jun 26, 2009 at 08:29 UTC
    To quote something BrowserUk said a few months ago ... The point of this place ...

    Don't take this the wrong way--I actually agree with you that the Perldocs could do with (links) to more examples--but there is a distinct and extremely important difference between this place and the Perldocs.

    I'm not sure if it is a limitation of POD; the MAN format; or simply tuits; but the biggest limitation of the Perldocs is not content, but structure.

    Given the hierarchal nature of HTML, it would be really nice to utilise that to have a keyword index; that linked keywords to summary descriptions; that linked to basic examples; that linked to expanded discussion; that linked to error messages and common pitfalls.

    Probably the best producers of program and language documentation (that I've encountered), were the long defunct guys and gals at DEC. Besides that they appreciated the difference between understanding a subject and being able to convey it; their greatest skill was knowing that sometimes removing words is better than adding them.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^3: Where is if...elsif...else documented in perldoc?
by Anonymous Monk on Jun 26, 2009 at 06:03 UTC
Re^3: Where is if...elsif...else documented in perldoc?
by ambrus (Abbot) on Jun 26, 2009 at 07:30 UTC

    NO! In the last few years, the reference perldocs have been littered with more and more examples and tutorials. Don't. I like references. Perl comes with tutorial perldocs too, if there has to be an example, put it there. I hate the form the core perldocs have taken these days.