Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

perlfunc:syswrite

by gods
on Aug 24, 1999 at 22:43 UTC ( #324=perlfunc: print w/replies, xml ) Need Help??

syswrite

See the current Perl documentation for syswrite.

Here is our local, out-dated (pre-5.6) version:


syswrite - fixed-length unbuffered output to a filehandle



syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET

syswrite FILEHANDLE,SCALAR,LENGTH



Attempts to write LENGTH bytes of data from variable SCALAR to the specified FILEHANDLE, using the system call write(2). It bypasses stdio, so mixing this with reads (other than sysread()), print(), write(), seek(), or tell() may cause confusion because stdio usually buffers data. Returns the number of bytes 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 bytes counting backwards from the end of the string. In the case the SCALAR is empty you can use OFFSET but only zero offset.


Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[oiskuu]: marto, it ended badly? I doubt the power is easy to plug at those installations?
[marto]: oiskuu sadly yes
[Your Mother]: My cat used to climb into the freezer when I opened it. Once I closed it and left him for 5 minutes hoping to disuade the habit. When I opened it expecting a cat eager to never return he just stared at me. Had to pull him out.
[Your Mother]: oiskuu, I think we should just be friends.
[marto]: the 'cool' place to hang out
[Your Mother]: ♫ Caffeine, caffeine, caffeine, caffeine. There will be answer, caffeine. ♫ ♬
[oiskuu]: Ahh, old cats with rheuma. I think (s)he was saying, "dude, NOT cold enough."

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (13)
As of 2017-12-18 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (488 votes). Check out past polls.

    Notices?