Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2017-04-29 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (534 votes). Check out past polls.