Name
write
Synopsis
$fh->write (buf,len[,offset])
Like write found in C;
that is, the opposite of read.
The wrapper for the Perl write
function is format_write.
IO::Handle also provides the following methods, which are not described in detail here because they are simply frontends for the corresponding built-in functions. See Chapter 5 for more information.
Method | Description |
|---|---|
| Closes file or pipe |
| Returns |
| Returns file descriptor for a filehandle |
| Returns next character from input file |
| Prints a string or comma-separated list of strings |
| Prints a formatted string |
| Reads data from a filehandle |
| Returns an array of status information for a file |
| Reads data from a filehandle with system call
|
| Writes data to a filehandle with system call
|
| Truncates a file to a specified length |
Finally, the following methods act on the equivalent Perl variables. See Chapter 4 for more information.
Method | Description |
|---|---|
| If nonzero, forces a flush now and after each
write or print (default |
| Current page number |
| Current page length (default |
| Number of lines left on page |
| Name of current report format |
| Name of current top-of-page format |
| Current set of linebreak chars for a format |
| Formfeed char used by formats (default
|
| Wrapper for |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access