Heres my problem, i have a file thats in, what i assume, to be a binary format. Basically the program takes a file with a series of plain alphanumerics seperated by new lines and then translates it into this binary format. The reason im thinking its binary is b/c its got all these funky characters that definately dont appear on the keyboard. Anyways, my problem is that i need to figure out how to translate to, and back from, the binary format, using perl perferably. I know what the series of characters it takes to produce the ouput, but i cant figure out how to produce the output. Anyone out there have some idea of how i could easily figure this out? Im assuming i would use pack/unpack some how?

Heres an exmaple (i hope) of a text list and what it translates into binarily.
List:
//NAME: Untitled Deck 4 Black Lotus
And heres the contents of the binary file that produces:
Actually this is not the list, because it "Cannot cut, copy, or drag and drop text containing null (code = 0) characters".
So, here is a link to where i uploaded the file.

Also if anyone is curious, this is indeed for Magic: The Gathering (a card game), specifically for Apprentice

In reply to 'parsing' a binary file? by BUU

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.