http://www.perlmonks.org?node_id=899559


in reply to Re: unpack - array takes too many bytes
in thread unpack - array takes too many bytes

Wonderful!

I guess my misunderstanding was to expected the digit in C2 to limit the assignment to 2 bytes, which it clearly does not.

Actually replacing C2 by C1 in your code like so:
(@two[0..1], @four[0..3], $one) = unpack "C1 C4 C", $data; print "@two | @four | $one"; # 65 66 | 67 68 69 70 |
And warns for uninitialized likely undef. I am really missing the purpose of what the digit does!?