I've read:
A common misconception in socket programming is that \n eq \012 everywhere. When using protocols such as common Internet protocols, \012 and \015 are called for specifically, and the values of the logical \n and \r (carriage return) are not reliable.
before, and stuff around it, and I still don't understand :-(
Is this telling me that when Perl interpolates the string "\r\n" that it may use some other values for the two escapes ? If so, where ? I've not been able to catch it doing that, but I have only got Winders and LINUX to go on. Does "\n" interpolate to "\x0D" on a Mac ?
I understand that IO layers may translate "\x0A" bytes to and from "\x0D\x0A" pairs and vice versa. I guess there's similar support for "\x0D" line-endings (though I haven't found it). I can see that means that if you think of "\n" as interpolating to a local system newline, you may be disappointed. But that's not the same as "\n" interpolating to something different in different places or at different times.
Desperately seeking enlightenment....
|