NAME

syswrite - fixed-length unbuffered output to a filehandle


SYNOPSIS

syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET

syswrite FILEHANDLE,SCALAR,LENGTH


DESCRIPTION

Attempts to write LENGTH bytes of data from variable SCALAR to the specified FILEHANDLE, using the system call write. It bypasses stdio, so mixing this with prints may cause confusion. Returns the number of bytes actually written, or undef if there was an error. If the length is greater than the available data, only as much data as is available will be written.

An OFFSET may be specified to write the data from some part of the string other than the beginning. A negative OFFSET specifies writing from that many bytes counting backwards from the end of the string.