Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Read structure in Perl

by ctilmes (Priest)
on Mar 22, 2010 at 11:47 UTC ( #830071=note: print w/ replies, xml ) Need Help??

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.

Comment on Re: Read structure in Perl
Replies are listed 'Best First'.
Re^2: Read structure in Perl
by Corion (Pope) 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!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://830071]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2015-11-26 14:55 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (701 votes), past polls