![]() |
|
laziness, impatience, and hubris | |
PerlMonks |
Re^7: sysread/syswrite wrappersby BrowserUk (Pope) |
on Oct 12, 2016 at 15:31 UTC ( #1173860=note: print w/replies, xml ) | Need Help?? |
Yes, they do! print is just syswrite + a little; readline is just sysread with a loop looking for the current value of $/. In other words, your wrappers are exactly equivalent to those built-ins; except that they are in C and thus vastly more efficient; and well tried and tested thus more likely to be correct. As for that; there is a huge difference between quoting the manual and understanding what it says. The *ONLY REASON* print and readline are said to "not work with select", is because they will block if they receive a partial message, thus preventing the code from getting back to the select. IE. They do exactly what your wrappers do; except they're more likely correct. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|