Thanks for looking into the version differences. I will take your advice and avoid Switch. I am proposing (to nonbelievers I work with) to use perl as a replacement for what is currently a custom sub-configuration file with logical selections based on settings in a top-level config file. The switch statement would be more familiar and therefore more likely to be favorably received (than if-elsif-elsif-elsif...else). In any case, I will request a company wide update to 5.10 before I propose the config file change. I trust that the given-when construct is a different animal inside than switch-case.

I also plan to get Readonly installed to replace use constant as suggested by Conway's PBP book, unless...

Also, thanks to the other monk who provided background on how Switch is implemented under the covers. I am not a fan of source filters.


In reply to Re^2: Syntax error with use constant and switch with comment between by ascetic
in thread Syntax error with use constant and switch with comment between by ascetic

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.