Cheap web site hosting service by Active-Venture.com
  

 Back to Index

syswrite

syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET
 
syswrite FILEHANDLE,SCALAR,LENGTH
 
syswrite FILEHANDLE,SCALAR

Attempts to write LENGTH characters of data from variable SCALAR to the specified FILEHANDLE, using the system call write(2). If LENGTH is not specified, writes whole SCALAR. It bypasses buffered IO, so mixing this with reads (other than sysread()), print, write, seek, tell, or eof may cause confusion because stdio usually buffers data. Returns the number of characters actually written, or undef if there was an error. If the LENGTH is greater than the available data in the SCALAR after the OFFSET, 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 that many characters counting backwards from the end of the string. In the case the SCALAR is empty you can use OFFSET but only zero offset.

Note the characters: depending on the status of the filehandle, either (8-bit) bytes or characters are written. By default all filehandles operate on bytes, but for example if the filehandle has been opened with the :utf8 I/O layer (see /open, and the open pragma, open), the I/O will operate on characters, not bytes.

 

  

 

Domain registration - Domain registration service and cheap domain transfer
 

Cheap domain names -
Register domain name services from just
$8.95/year only
 

Register domain name search -
Register domain or buy domain name registration and cheap domain transfer at low, affordable price.

© 2002-2004 Active-Venture.com Web Site Hosting Service

 

[ Don't get suckered in by the comments— they can be terribly misleading. Debug only code.   ]

 

 
 
 

Disclaimer: This documentation is provided only for the benefits of our web hosting customers.
For authoritative source of the documentation, please refer to http://www.perldoc.com