in reply to Re^3: why the unpack doesnt split the data to the array ?
in thread why the unpack doesnt split the data to the array ?
So I would expect that @data array would contain 21 items...each item should be as long as it is specified in the template so C - means ONE unsigned char , C5 - FIVE unsigned chars and so on... so I would like the data in $buffer to be unpacked into these 21 items (f0, ..., last twenty bytes - since the last template says C20) That is what I want...SPLIT THE DATA into the @data array...@data = unpack('C C C C C C C C C C3 C3 C5 C5 C3 C3 C3 C C3 C C12 C20' +, $buffer);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: why the unpack doesnt split the data to the array ?
by ikegami (Patriarch) on Aug 06, 2008 at 19:24 UTC |