in reply to What is this warning? 'Character in ''c'' format wrapped at ...'
So your unsigned number is wrapped so it fits into a signed bytes, completely in agreement with the rules of 2's complement. The lower 8 bits are the same, but the additional higher bits are thusly chosen so the resulting number is in range: that number is -36.
print unpack 'c', pack 'C', 220;
Don't use the 'c' template if you don't plan on using signed numbers. Use 'C'.
|
|---|