```{index} single: write; POSIX function ``` ```{index} single: POSIX::write; Perl function ``` # write Write bytes from `$buffer` to `$fd`. ## Synopsis ```perl POSIX::write($fd, $data, length($data)); ``` ## What you get back The number of bytes actually written. A value less than `$nbytes` is not an error — common for pipes and sockets — and the caller must loop to write the rest. ## Differences from upstream Fully compatible with upstream POSIX.