I had occasion to write a 5-byte number to a binary file. The only way I could think of to do it was to "format" the number into a 64-bit (W) number, "scan" it into a HEX string, parse the string 1 byte at a time, and write out the 5 individual (least significant) bytes:
set t4 [binary...