in reply to UDP Server Binary Data
Is it possible to write the data in its raw format to a file?
Yes. You already are. You might want to binmode the file handles from which you read and to which you write.
Is it possible to display the data in its raw format on the screen?
No, bytes don't have appearance. Binary data means "a series of bytes, usually not meant for human understanding", so its raw format is a series of bytes. What would you expect a series of bytes to look like? You can see chairs, tables and desks, but a byte?
Whatever your answer is, your answer is simply a means of *representation* bytes and not actually seeing bytes themselves. You asked Perl (by using treating the bytes as a string) to display them as characters. You could display the bytes as a sequence of hex numbers instead, but that's not going to change what's being stored. You'll have to pick a representation. Perhaps the output generated by this code I wrote will satisfy your needs.
|
|---|