Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Handling Hex data with Dynamic unpack

by Marshall (Canon)
on Jul 05, 2012 at 11:16 UTC ( [id://980031]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $HeaderRecordId = substr($buf,0,1);
    my $FileFormatVersion = substr($buf,1,1);
    my $TimeStamp = substr($buf,2,8); #some kind of unpack needed here!
    my $NumBSC = substr($buf,10,1);
    
  2. or download this
    code snippet...
         read(IN, my $buff, 1 * 2**10);
    ...
         (substr($buff,50,4) eq "data")|| die "data segment not found";
         my $dsize = unpack ("V4",substr($buff,54,4));   
         myprint (" DATA Segment size = $dsize");
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2024-04-16 09:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found