Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: What is the difference between sending bytes and characters over sockets?by tilly (Archbishop) |
on Feb 20, 2004 at 22:18 UTC ( [id://330678]=note: print w/replies, xml ) | Need Help?? |
You really need to find out what the difference is between what you sent, and what that person expected to see. If you are on Windows, you very well may need to use binmode to be sure that your end of line doesn't get translated into 2 characters. You might be sending numbers and they need the output of a pack statement (see also unpack) rather than a text representation of the number. There are stranger possibilities. For instance the program at the other end of the line might be written in C, and might be looking for the end of your string to be a null byte (you write that as "\0"). Or you could unexpectedly be sending data in UTF-8 format and need to turn that off. The description makes it unclear how to solve the problem. You need to first get more detail about how what you sent doesn't match what is needed, and then figure out how to solve that.
In Section
Seekers of Perl Wisdom
|
|