I apologise. I omitted an essential part of the first unpack template (the repeat *). Please try substituting this:
The template has become: '(a3954)*' which tells unpack to split the buffer into as many 3954-byte chunks as are available.my @matrix = map[ unpack 'C*', $_ ], unpack '(a' . NCOLS . ')*', $buff +er;
In reply to Re^3: Unpack an 8 bit unsigned char matrix
by BrowserUk
in thread Unpack an 8 bit unsigned char matrix
by Ineffectual
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |