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
01 1 'Audit Trail' (pps 1) DIR 09.09.2011
02 1 'Audit Trail Property' (pps af) FILE 50
03 2 'File Comment' (pps 18) FILE 1
04 3 'File Property' (pps 17) FILE c65
05 4 'GC Raw Data 1' (pps 5) DIR 14.09.2011
06 1 'Status' (pps e3) FILE 36
07 2 'Status Data' (pps e6) FILE 0
08 3 'Intensity Data' (pps e4) FILE 9f60
09 4 'Intensity Data Flag' (pps e5) FILE 13ec
10 5 'GC Raw Data 2' (pps 6) DIR 09.09.2011
217 7 'Grouping Results' (pps c9) FILE 32
218 8 'Peak Picking Param' (pps ca) FILE 28
219 9 'Quantitation Param' (pps cb) FILE 30
220 10 'Time Program For Data' (pps cc) FILE 18
221 11 'Time Program For Method' (pps cd) FILE 18
222 12 'Column Performance Param' (pps ce) FILE 68
223 13 'Compound Calib Peak Info' (pps cf) FILE d0
224 14 'Grouping Calib Peak Info' (pps d0) FILE d0
225 15 'Compound Calib Curve Info' (pps d1) FILE 0
226 16 'Compound Calib Peak Info2' (pps d2) FILE 30
227 17 'Grouping Calib Curve Info' (pps d3) FILE 0
228 18 'Grouping Calib Peak Info2' (pps d4) FILE 30
229 27 'GC Data Processing Original 2' (pps 11) DIR 09.09.2011
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?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- 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
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||