in reply to Re^8: How do I display only matches
in thread (SOLVED) How do I display only matches
Accurate wording is important.
We both agree that "\n" prints something different under Unix than on Windows.
No. What gets written to a handle by a print "\n" can be the same on both platforms, or different, depending on which I/O layers are in effect.
I further claim that all network communication uses <CR><LF> as the transmitted line ending. You do not believe that.
No, I didn't say that either. You claimed that "no matter what the OS platform, when writing to a network socket, "\n" means <CR><LF>", which I proved to be incorrect. This is completely separate from the fact that many network protocols do indeed use CRLF as their standard line ending (Update: and certainly not "all" network protocols use CRLF).
I am curious what these nulls mean? "foo\n\0"\0
I added the \0s for two reasons: the server is hard-coded to expect five bytes, and I wanted to make sure that the client always sends at least that many bytes, second, I wanted it to be clear that the server isn't reading too few bytes and cutting off something relevant. The \0 after the quote is AFAIK Perl's way of saying the string is null-terminated (ASCIIZ).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: How do I display only matches
by Marshall (Canon) on Sep 28, 2019 at 04:28 UTC | |
by haukex (Archbishop) on Sep 28, 2019 at 07:22 UTC |