start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: system Chapter 5
Function Reference
Next: Reference: tell
 

syswrite

syswrite 
filehandle
, 
scalar
, 
length
, [
offset
]

Writes length bytes of data from variable scalar to the specified filehandle . The function returns the number of bytes actually written, or the undefined value on error. You should be prepared to handle the problems that standard I/O normally handles for you, such as partial writes. The offset , if specified, says where in the string to start writing from, in case you're using the string as a buffer, for instance, or you need to recover from a partial write.

Do not mix calls to print (or write ) and syswrite on the same filehandle unless you really know what you're doing.


Previous: Reference: system Perl in a Nutshell Next: Reference: tell
Reference: system Book Index Reference: tell

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.