It's Perl. You do have to understand Perl to understand it.

You have to do more than that.

No. You just have to understand Perl. Not C; not Java; not C# or VB. Just understand Perl.

If people are going to program in Perl, it behooves them--for their own benefit--to learn Perl. All of it, not just the bits that look like something else they've already done.

As for the bullet points: sometimes people need complex stuff.

The point is, to the exponents of those fields, none of those are particularly complex. You just have to understand the notation. And so it is with the Perl I posted.

Being understandable and being clear are not the same thing.

If you take the time to understand it, the code I posted is perfectly clear.

  1. Open a file.
  2. Populate a hash of arrays.
  3. Close the file.
bichonfrise74's confusion ...

I saw no confusion, just intelligent questions from someone wanting & willing to learn. That is what this place is all about after all.

not something to be proud of.

It has nothing to do with pride. It is the natural progression of language development.

Generations 1, 2, 3, and 4. That is the power of Very High Level Languages. That is what makes Perl programmers so productive. If the old metric of a reasonable programmer being able to write, test, debug and documement 10 lines of code regardless of the language; that makes a Perl programmer--who uses the full power of Perl to his advantage--far more productive than the Java programmer. Or those that insist on writing Java or C in Perl.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^5: How can I group lines in a file? by BrowserUk
in thread How can I group lines in a file? by Anonymous Monk

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.