Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 avoiding work at the Monastery: (7)
As of 2015-08-05 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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













    Results (80 votes), past polls