Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by BrowserUk (Pope)
on Jun 05, 2013 at 22:46 UTC ( #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
Node Status?
node history
Node Type: note [id://1037316]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2015-08-30 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (348 votes), past polls