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

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

by ig (Vicar)
on May 22, 2013 at 23:32 UTC ( #1034829=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my @arr = unpack('(W W @0Wx/a @1W@0Wx/x/a)', "\005\006Hello World");
    
    print Dumper(\@arr);
    
  2. or download this
    $VAR1 = [
              5,
    ...
              'Hello',
              ' World'
            ];
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2016-09-27 23:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (516 votes). Check out past polls.