Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: how to unpack a C struct with length array preceding data array

by BrowserUk (Patriarch)
on Jun 05, 2013 at 22:46 UTC ( [id://1037316]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    say unpack "C/A", "\x05hellofred";;
    hello
    
  2. or download this
    my( $len1,  $len2  ) = unpack "SS", $packed;
    my( $data1, $data2 ) = unpack "x[SS] A$len1 A$len2", $packed;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-19 12:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found