Dear Monks, I have a csv file having information running on multiple rows each having 880 columns as 1s and 0s. Its basically to show the occurence of 880 properties each denoted in a column with 1 for entities characterised in each rows. I want to write the contents of the csv file to a binary file.

The information I am trying to convey in a row can be easily represented by one bit for a column so I want to have a binary file with smaller size than original csv. Also I want to compare every bit in one row in the binary file to respective bits across all rows in a different file and calculate a property value for each row. The number of rows in second file can be as high as 50 million so I want the property calculation to be faster.

Please tell me if this can be accomplished through PERL and the functions I need to explore for the same. Thank you!


In reply to Bit handling in Perl 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.