There is a speed compare page available. Your split will FAIL on one of the easiest pitfalls, used for the timing. This perfectly formatted CSV line will break any split pattern, and it does not even contain embedded newlines:

hello,","," ",world,"!"

If you need correct CSV parsing of purely strict CSV, and that excludes space after the separator, use a module like Text::CSV::Easy_XS, which allows no deviation from the standard. If you require speed in addition to robustness, options (like space after the separator) and a usable interface, use Text::CSV_XS. If XS is not an option, use any of the _PP variants.

The more data you have to parse, the happier a module will make you. It's loading time outweighs the headaches of finding possible breakages.


Enjoy, Have FUN! H.Merijn

In reply to Re^5: Matching alphabetic diacritics with Perl and Postgresql by Tux
in thread Matching alphabetic diacritics with Perl and Postgresql by anonymized user 468275

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.