Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Comment on

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

What is a gcd file and what data are you trying to extract from it?

As bulk88 points out the file that you are trying to parse is an OLE compound document (of which Word documents are an example but your file isn't a Word document).

The smplls utility that comes with OLE::Storage_Lite shows the following in the file format:

$ perl sample/ ../LaborHoppe_P1_UNK-0010_09.09.2011_1.gcd 00 1 'Root Entry' (pps 0) ROOT 20.09.2011 +08:42:10 01 1 'Audit Trail' (pps 1) DIR 09.09.2011 +17:22:14 02 1 'Audit Trail Property' (pps af) FILE 50 +bytes 03 2 'File Comment' (pps 18) FILE 1 +bytes 04 3 'File Property' (pps 17) FILE c65 +bytes 05 4 'GC Raw Data 1' (pps 5) DIR 14.09.2011 +11:15:27 06 1 'Status' (pps e3) FILE 36 +bytes 07 2 'Status Data' (pps e6) FILE 0 +bytes 08 3 'Intensity Data' (pps e4) FILE 9f60 +bytes 09 4 'Intensity Data Flag' (pps e5) FILE 13ec +bytes 10 5 'GC Raw Data 2' (pps 6) DIR 09.09.2011 +17:41:29 ... 217 7 'Grouping Results' (pps c9) FILE 32 + bytes 218 8 'Peak Picking Param' (pps ca) FILE 28 + bytes 219 9 'Quantitation Param' (pps cb) FILE 30 + bytes 220 10 'Time Program For Data' (pps cc) FILE 18 + bytes 221 11 'Time Program For Method' (pps cd) FILE 18 + bytes 222 12 'Column Performance Param' (pps ce) FILE 68 + bytes 223 13 'Compound Calib Peak Info' (pps cf) FILE d0 + bytes 224 14 'Grouping Calib Peak Info' (pps d0) FILE d0 + bytes 225 15 'Compound Calib Curve Info' (pps d1) FILE 0 + bytes 226 16 'Compound Calib Peak Info2' (pps d2) FILE 30 + bytes 227 17 'Grouping Calib Curve Info' (pps d3) FILE 0 + bytes 228 18 'Grouping Calib Peak Info2' (pps d4) FILE 30 + bytes 229 27 'GC Data Processing Original 2' (pps 11) DIR 09.09.2011 + 17:22:14

At first glance this doesn't seem to match the unpack statement in your program. Are you sure it is meant to parse the same file format?


In reply to Re: Read a bin file and extract data by jmcnamara
in thread Read a bin file and extract data by hiX0r

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?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (12)
    As of 2018-03-23 17:23 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (295 votes). Check out past polls.