Perl contains many shortcuts (or conveniences, if you prefer) designed, in part, to save some typing. For example:

Update: Fixed the slash problem (thanks, Fastolfe).

Given some of the recent discussion regarding coding style, is it best to avoid counting on these shortcuts?

My thinking here is based on my experience in other languages. For example, in certain languages, you can occasionally get away with implied typecasting. However, there are times when the results of an implied cast are not what you were after and the novice ends up fruitlessly hunting for a bug in what appears to be perfectly good code.

More practically, I wonder if certain examples (no, I don't have any in mind) reply too heavily on shortcuts.

What do you think? What shortcuts, if any, do you take advantage of and which ones do you specifically ignore (e.g. type the longer form)?

----------
For the record, I try to be as specific as possible, if only to help the hapless novice that has to maintain my code in the future.


In reply to Regarding style by footpad

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.