Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Being able to parse that example (or CSV data likewise) is exactly why I started implementing multi-byte separation characters.

As said elsewhere in this thread, if I am happy with the result, I'll try to also implement quotation and escapes as such. Quotation being on a way higher priority than escapes. Current state in development:

$ cat films.csv
🎥Film🎥🎬🎥Year🎥🎬🎥Awards🎥🎬🎥Nominations🎥🎬🎥Director🎥
🎥12 Years a Slave🎥🎬2013🎬3🎬9🎬🎥🎥🎥 Steve McQueen🎥
🎥Argo🎥🎬2012🎬3🎬7🎬🎥🎥🎥 Ben Affleck🎥
🎥The Artist🎥🎬2012🎬5🎬10🎬🎥🎥🎥 Michel Hazanavicius🎥
🎥The King's Speech🎥🎬2010🎬4🎬12🎬🎥🎥🎥 Tom Hooper🎥
🎥The Hurt Locker🎥🎬2009🎬6🎬9🎬🎥🎥🎥 Kathryn Bigelow🎥
🎥Slumdog Millionaire🎥🎬2008🎬8🎬10🎬🎥🎥🎥 Danny Boyle🎥
🎥No Country for Old Men🎥🎬2007🎬4🎬8🎬🎥🎥🎥 Joel Coen
🎥🎥 Ethan Coen🎥
🎥The Departed🎥🎬2006🎬4🎬5🎬🎥🎥🎥 Martin Scorsese🎥
$ head -1 films.csv | dump
DUMP 0.6.01

00000000  F0 9F 8E A5 46 69 6C 6D  F0 9F 8E A5 F0 9F 8E AC    ....Film........
00000010  F0 9F 8E A5 59 65 61 72  F0 9F 8E A5 F0 9F 8E AC    ....Year........
00000020  F0 9F 8E A5 41 77 61 72  64 73 F0 9F 8E A5 F0 9F    ....Awards......
00000030  8E AC F0 9F 8E A5 4E 6F  6D 69 6E 61 74 69 6F 6E    ......Nomination
00000040  73 F0 9F 8E A5 F0 9F 8E  AC F0 9F 8E A5 44 69 72    s............Dir
00000050  65 63 74 6F 72 F0 9F 8E  A5 0A                      ector.....

$ perl -C3 -MCSV -E'csv (out => *STDOUT, in => csv (in => "films.csv", sep => "\N{CLAPPER BOARD}"))'
"🎥Film🎥","🎥Year🎥","🎥Awards🎥","🎥Nominations🎥","🎥Director🎥"
"🎥12 Years a Slave🎥",2013,3,9,"🎥🎥🎥 Steve McQueen🎥"
"🎥Argo🎥",2012,3,7,"🎥🎥🎥 Ben Affleck🎥"
"🎥The Artist🎥",2012,5,10,"🎥🎥🎥 Michel Hazanavicius🎥"
"🎥The King's Speech🎥",2010,4,12,"🎥🎥🎥 Tom Hooper🎥"
"🎥The Hurt Locker🎥",2009,6,9,"🎥🎥🎥 Kathryn Bigelow🎥"
"🎥Slumdog Millionaire🎥",2008,8,10,"🎥🎥🎥 Danny Boyle🎥"
"🎥No Country for Old Men🎥",2007,4,8,"🎥🎥🎥 Joel Coen"
"🎥🎥 Ethan Coen🎥"
"🎥The Departed🎥",2006,4,5,"🎥🎥🎥 Martin Scorsese🎥"
$

Enjoy, Have FUN! H.Merijn

In reply to Re^7: Speeds vs functionality by Tux
in thread Speeds vs functionality by Tux

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others examining the Monastery: (4)
    As of 2020-12-02 07:25 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      How often do you use taint mode?





      Results (35 votes). Check out past polls.

      Notices?