in reply to Re: write/syswrite return value differences
in thread write/syswrite return value differences

I suppose the OP is talking about the IO::Handle method write, and was probably misled by the wording 'is like "write" found in C':

$io->write ( BUF, LEN [, OFFSET ] )

This "write" is like "write" found in C, that is it is the opposite of read. The wrapper for the perl "write" function is called "format_write".

Replies are listed 'Best First'.
Re^3: write/syswrite return value differences
by ikegami (Patriarch) on Nov 24, 2011 at 18:29 UTC
    Ah yes. Then it should probably return the bytes written. Unfortunately, it doesn't have that information available, and it wouldn't be feasible to do that.
Re^3: write/syswrite return value differences
by FreakyGreenLeaky (Sexton) on Nov 29, 2011 at 13:39 UTC

    That's right, I misread the docs thinking it's mirroring C's write() function...

    oh well, thanks!

      hum, Eliya pointed out that I was wrong and that IO::Handle's write does mirror C's (really POSIX's) write. Except in return value, of course.

      "This write is like write found in C"