Your comparison to strict and warnings is flawed. When those are off, the program usually fails in subtle ways. When you use a "complex" handle expression without curlies, you get a syntax error in the expression. I find it hard to believe it takes "way too long" to debug an error when the exact location is provided to you.

I don't see what having seen the perl source has to do with this. Half (4 out of 11 lines) of print's documentation covers the fact that the curlies are needed for "complex" handle expressions. I strongly advocate against using indirect method invocation anywhere else.

So all that's left is the argument that you might trip in the future. I understand the argument. I advocated split // over split "" elsewhere in this thread for the this very reason. However, given how unsubtle the error is when you do trip, I see that positive outweighed by the fact you're asking newcomers write code differently than everyone else. I'm not saying noone uses curlies, but that I've never seen anyone use curlies for a simple scalar before. If more people used the curlies, I'd advocate them.


In reply to Re^6: File open problem with "GLOB" by ikegami
in thread File open problem with "GLOB" by mcoblentz

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.