$var = pack "C2", 0x20, 0x30;
seems to work well enough, but now how do I address the elements of the array? Make changes to elements? In-place if possible. The pack/unpack semantics are not very friendly.
Currently I'm using substr($var, $index, 1, substr($var, $index, 1) + 10)
to add 10 to elements in-place.
And for intializers, if I need a 100 byte array of 0x20, what's the best way? $var = "\x20" x 100
works, is it the 'right' way?