
rovf
Veteran
Oct 17, 2011, 7:58 AM
Post #6 of 7
(3824 views)
|
|
Re: [w00005414] issue with file captured by IO::Socket::INET
[In reply to]
|
Can't Post
|
|
I found something in perldoc perlipc, which could be related to your issue (it's in the section labelled "Sockets: Client/Server Communication"):
Internet Line Terminators The Internet line terminator is "\015\012". Under ASCII variants of Unix, that could usually be written as "\r\n", but under other systems, "\r\n" might at times be "\015\015\012", "\012\012\015", or something completely different. The standards specify writing "\015\012" to be conformant (be strict in what you provide), but they also recommend accepting a lone "\012" on input (but be lenient in what you require). We haven't always been very good about that in the code in this manpage, but unless you're on a Mac, you'll probably be ok. Note that this explicitly mentions your case (\015\015\012). This means that it's pointless to think where the spurious 0D comes from, and you should, ideally, write your listener in a way that it accept all those line endings, including 0D0D0A, and convert them to a single \n (or what else you want to have as line ending).
|