in reply to Random read/write on a block device
I know syswrite() and seek() are mutually incompatible.
But sysseek isn't.
Does the 4th parameter to syswrite() do the same as seek() on the file handle?
No. As documented, "An OFFSET may be specified to write the data from some part of the string other than the beginning."
That means syswrite($fh, "abcdef", 2, 3) will write three bytes starting at index 2: de.
FYI, [doc://funcname] links to better (up to date) documentation. [funcname] finds rather old documentation which isn't rendered particularly well.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Random read/write on a block device
by FloydATC (Deacon) on Jun 25, 2009 at 12:13 UTC | |
by ikegami (Patriarch) on Jun 25, 2009 at 16:15 UTC |