Yeah, but that statement is a bit silly. Using all cap names doesn't avoid collision with other barewords. Typical barewords found in Perl programs are uppercase: file and directory handles. The other major category of barewords are in titlecase: package names. Barewords as in unquoted strings I only find in the student books of the Perl courses of HP Education.

Avoiding collisions with subroutine names? Come again? You know which subroutine names you are using, don't you? Besides, what if you do use subroutines, aren't you in grave danger of colliding with other subroutine names? No, of course not. It's not a problem for the set of subroutines in a program, and won't suddenly be a problem if you use lowercase constants.

Leaves us collisions with keywords. Well, you know which keywords there are, so it's easy to avoid them. The only potential problem you have is when you upgrade perl, new keywords might be introduced. Of course, you already have a problem because subroutine names can collide as well. But how common are new keywords in new versions of Perl anyway? In the last couple of yours, new keywords are our and lock, both introduced in 5.005. But in 5.005, we also saw the birth of INIT and in 5.6.0, CHECK was introduced. So, using all caps is as likely to cause a collision as to use all lowercase.

If you want to reduce the chance of collisions, you'd use names starting with a lowercase letter, and having one or more uppercase letters in them as well.

Abigail


In reply to Re: constant confusion by Abigail-II
in thread constant confusion by Mr. Muskrat

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.