Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://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/smplls.pl ../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?

--
John.


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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-03-28 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found