I can't find that difference in behaviour between read and sysread described on any perl docs so it's probably an implementation detail that shouldn't be taken for granted.
| [reply] [d/l] [select] |
The difference described in the perl docs is that Perl sysread() uses the read() system call, whereas Perl read() uses the fread() call or Perl's equivalent. In the majority of common UNIX systems, it is not an error for the read() system call to return fewer than the requested number of bytes (see the read(2) manpage) if not that many bytes have arrived yet. Unfortunately, several modules that will depend on the one I'm working on take advantage of this quirky behavior, and it's not in my power to change them.
| [reply] [d/l] [select] |