in reply to Re^4: problem with 'bare LF' in script
in thread problem with 'bare LF' in script
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....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: problem with 'bare LF' in script
by GrandFather (Saint) on Nov 12, 2008 at 19:42 UTC | |
by gone2015 (Deacon) on Nov 13, 2008 at 00:47 UTC | |
by GrandFather (Saint) on Nov 13, 2008 at 01:49 UTC | |
by ikegami (Patriarch) on Nov 12, 2008 at 21:41 UTC | |
by gone2015 (Deacon) on Nov 13, 2008 at 01:15 UTC | |
by ikegami (Patriarch) on Nov 13, 2008 at 05:03 UTC | |
by gone2015 (Deacon) on Nov 13, 2008 at 10:51 UTC | |
| |
|
Re^6: problem with 'bare LF' in script
by ikegami (Patriarch) on Nov 12, 2008 at 21:35 UTC |