in reply to packing into a byte token

There is an old but a great tutorial in a dusty corner here in the monastery on how to to use pack/unpack that google always finds if you search for perl pack/unpack documentation.