> "Sometimes Perl is not the best tool for the job."

OK this a "Jein" situation.

Perl is certainly often not the best tool.

But if it comes to sed and awk it's hard to believe, because Larry meticulously copied all features.

I bet, I could easily translate this given awk script in a one2one fashion to Perl, by encapsulating the open on demand into a short sub.

Just look at perlvar , perlrun and perltrap at all the details given concerning awk. Now the startup argument for short data, where overhead counts ...

... startup isn't the same issue anymore like it was 25 years ago.

To make it matter we need start a script over and over again. The realistic approach in this case is to write a persistent service which doesn't even need to start up.

We are not talking about heavy apps like perltidy which may need a second to initialize.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery


In reply to Re^7: Split tab-separated file into separate files, based on column name (open on demand) by LanX
in thread Split tab-separated file into separate files, based on column name 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.