You say (correctly, IMO) that the idiom requires knowledge of:

  1. local;
  2. the input record seperator, $/;
  3. ARGV magic;
  4. list assignment greediness.

FWIW, I think that's a useful list. It could even be seen as a succinct analysis of how the idiom works. It made me appreciate how much Perl I have learned over the past year.

I knew all of the items except for no. 3, the ARGV magic, which Aristotle pointed out to me, and which I then went off and learned about in perlop (section: "I/O Operator"). I have started using the idiom in my own production code (which is not subject to a code review, except by myself).

I do appreciate your point of view, nonetheless I think it goes too far.

Your point about coworkers really is very subjective. It doesn't say anything about how valid the idiom is *as an idiom*. But that's the whole point, I think, idioms are subjective. And as others have mentioned already, it will always be near impossible to draw a line or boundary for something subjective like this.

Yes the corporate/coding_standard reaction to this will often be to just ban it, but that doesn't make it right. Tomorrow they could be banning <> or $_ as well.


In reply to Re: Idioms considered harmful by DapperDan
in thread Idioms considered harmful by rinceWind

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.