http://www.perlmonks.org?node_id=830071


in reply to Read structure in Perl

As others note, more details are needed to really give you the answer.

The general Perl way to unpack structures such as those typically read by fread in C may involve use of the unpack function.

Replies are listed 'Best First'.
Re^2: Read structure in Perl
by Corion (Patriarch) on Mar 22, 2010 at 11:55 UTC

    As a hard-core alternative to unpack, there is Convert::Binary::C, which can take a C structure and a C compiler (even one for a different architecture), and unpack data in that C structure from Perl.

      Thanks for the tip!

      Looks like less work in the long run. Hardcore indeed!