Can you please: - explain what results you are really expecting for your code; - explain what your results are; - specify how the results differ from your expectation.

(OK, I have run your code, I know what the results are, but I would like a synoptical comparison of what you get and what you expected, how and why.)

I am very far from being an expert on the pack/unpack functions (I really don't use them often), but I have used them a few times lately and thus have some (limited) idea on how they work, and, prima facie, I am not so surprised by the results. So, please explain why you expect something else.

Granted, this documentation is not among the best pieces of documentation I have seen recently, but, well, you and I (and others) have to live with that. The other link gives in my view a less detailed but better overview:

I had to use the correct descriptor to correctly unpack an 8-bit packed value.

Since "pack" and "unpack" are inverse functions, I expected to get back the original value after running something through pack and unpack. Unpacking using the "i" descriptor should return the value in decimal instead of binary format (in this case, 6 instead of 00001100).

It didn't work because $v is 8 bits (the result of pack using "B8"), and the "i" descriptor wants a 32-bit value. The "c" descriptor is needed to unpack an 8-bit integer.