tye is clearly correct about what is deprecated, but I personally see the language as being both precise and correct. The word "our" was reserved by Perl (though at that point not yet used) and using that reserved word as a bareword is deprecated. Which is exactly what it said.

I am sorry that the implication you didn't know how to find information irked you though. Perl has excellent and comprehensive documentation which a tremendous amount of work has been put into. Regrettably most people who are introduced to the language are not shown the documentation and have no idea how to use it. If you were in the (good) habit of looking to that documentation then the first thing you would have done is typed, "perldoc perl". Scan down that index and you would have found the following section:

perldebug Perl debugging perldiag Perl diagnostic messages perlsec Perl security perltrap Perl traps for the unwary perlport Perl portability guide perlstyle Perl style guide
All of these are good reads, except perldiag which is meant to be a reference. Now you type "perldoc perldiag", and search for your message. (Type in "/", a chunk of text, then return. Hit "n" as often as needed until you reach the right section.) Try that, time how long it takes. I bet it is under 5 minutes.

Now it is likely that you cracked open the Camel book for this, possibly loooked in chapter 9. And you did not find the documentation. Well the reason for that is that the documentation that you are reading is for Perl 5.003, and the message you are reading is from Perl 5.005. After two minor revisions of the language there are different diagnostic messages. While the Camel book is both valuable and good, the current online documentation (ignored by most Perl programmers) is always going to be more accurate.

So whether or not you are irked, it is true. You made a perfectly understandable mistake out of very understandable ignorance of how to use the documentation system that Perl comes with. If I got irked every time I made such a mistake I would have little time for anything else! Just today I found that I was leaving zombies because I was not calling wait properly. Darn. Didn't know I had to do that. Ask KM if you don't believe me, I used him as the classic "blank wall" while I realized my error. (My background really is math, not Unix programming.) Clearly that is "Mea culpa!" My bad! OK, fix my code, file that away, and move on. I won't do that again.

So again. You didn't know how to RTFM. Now you do. There is no fault in not knowing, or even in having used Perl for years and not knowing. The fact is that most Perl programmers do not know. (The only person in that thread who gave the right answer is someone whose name I immediately recognized as a Perl guru. That says a lot. Much of it not very good.) That is a different problem. A serious one IMO, but not yours. A lot of work has gone into producing documentation that very few people read, and something needs to be done about that. (Do you have any suggestions?)

The only way that I could possibly think less of you for your not knowing what you were never told would be if you did not take this as a sign that you should develop the skill and habit of reaching for perldoc every time you are not positive of some detail. Develop that skill and your next unknown Perl diagnostic will take under 3 minutes to answer, in detail, with an answer that I guarantee is accurate.

Regards,
Ben Tilly

PS As for, "It's been one of those days" - well I think we have all been there. Many, many times. At least I have...

PPS BTW another gem, Perl has a naming convention. It will never reserve for its use any bare-word that is not "seriously weird" (like $@), all upper case, or all lower case. And yes, there is a convention on what types of variables fit which description as well. Therefore if you either never use barewords, or else you always have mixed case, you will never, ever, conflict with any keyword in the language.


In reply to RE (5): Should I use $ and $# ? by tilly
in thread Should I use $ and $# ? by Guildenstern

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.