Except that in this case TIMTOWTDI doesn't apply because your example produces two different end results-- which is NOT a case of doing "it", it's a case of doing different stuff. The best case here has nothing to do with Perl or its motto. It has everything to do with programmers learning to say what they mean with their code, since I expect whoever wrote {$b} didn't intend to insert {}'s into a filename, but thought they were using the ${b}. Or maybe it was an undetected typo. Even -w can't catch it when it results in valid syntax (the old too, two, to spellchecker problem).

In reply to (ichimunki) Re: TMTOWTDI isn't best in this case by ichimunki
in thread TMTOWTDI isn't best in this case by princepawn

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.