in reply to Re: output binary data
in thread output binary data

You probably are aware of this but "32-bit integer" could mean different things.

It could be either signed or unsigned or you may want (for networking purposes) use a different endianess (is that a word?) than the one your architecture uses.

Happily pack provides "l", "L", ,"N", and "V" to cater for all your needs as long as you know what you need.