Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Read structure in Perl

by ctilmes (Vicar)
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.

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://830071]
help
Chatterbox?
[karlgoethebier]: marto: "their inability.." Perhaps the result of a wrong education?
[karlgoethebier]: or no education?
[choroba]: their = his or her
[Discipulus]: anyway once I proposed an automatic font decrease for post below -1, stepping every 5 votes: i'm still thinks it's a good idea but dunno if feasible
[shmem]: ...emulated dual in english
[shmem]: Discipulus: has that been in the CB? or in a PM node proper? for the latter case, can you provide the ID?
[Discipulus]: you seriously can use their in this way in eng?
[Corion]: Meh. $effin_bad_system has an interface breakdown and then loads events in parallel with events overtaking one another instead of being processed sequentially
[shmem]: Discipulus: dunno, but we do all the time ^^
[choroba]: Discipulus I was taught so by a Londoner

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2017-05-23 08:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?