cat /come/and/play/with/$i | perl -ne 'print if length((split /,/)[10] +) > 6'
BTW, I cannot restrain myself from commenting anytime I see cat being used like this because, long ago on usenet, Tom Christiansen wrote: "If you find yourself calling cat with just one argument, you're probably doing something silly".

Following Tom's advice, I suggest you lose the cat (and the unnecessary pipe) by replacing:

cat /come/and/play/with/$i | perl -ne 'print if length((split /,/)[10] +) > 6'
with simply:
perl -ne 'print if length((split /,/)[10]) > 6' /come/and/play/with/$i

Update: Added content from Useless Use of Cat Award (thanks choroba):

The venerable Randal L. Schwartz hands out Useless Use of Cat Awards from time to time; you can see some recent examples in Deja News. (The subject line really says "This Week's Useless Use of Cat Award" although the postings are a lot less frequent than that nowadays). The actual award text is basically the same each time, and the ensuing discussion is usually just as uninteresting, but there are some refreshing threads there among all the flogging of this dead horse. The oldest article Deja News finds is from 1995, but it's actually a followup to an earlier article. By Internet standards, this is thus an Ancient Tradition.

Nearly all cases where you have:

cat file | some_command and its args ...
you can rewrite it as:
<file some_command and its args ...
and in some cases you can move the filename to the arglist as in:
some_command and its args ... file

Also mentioned at this site are:

Update: See also:


In reply to Re: perl one liner for csv file one field (useless use of cat and other awards References) by eyepopslikeamosquito
in thread perl one liner for csv file one field by MrTEE

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.