in reply to Writing at specific position and length in binary file.

as no_slogan points out, use print.

write is used for printing formatted text.

The opposite of read() is print().

To further confuse things, the functions sysread() and syswrite() are indeed opposite. They are the low level (unbuffered) versions of read() and print().

  • Comment on Re: Writing at specific position and length in binary file.

Replies are listed 'Best First'.
Re^2: Writing at specific position and length in binary file.
by thanos1983 (Parson) on Jan 12, 2014 at 04:48 UTC

    To: wazat, a start reading about sysread() and syswrite() and it looks like a good solution only in cases the program does not include seek() tell() etc. Unfortunately in my case these functions are necessary. It is nice to know that there are alternative solutions for future use. Thank you for your time and effort.

    I am new user to this cite and I have not figure out how to vote answers, it is not so clear to me. Can you point me to right direction to read the documentation thanks again. Best Regards.

      You can use sysseek with sysread and syswrite. There's also a workaround for tell.

      But, you probably still don't want to use the sys* functions, because they don't do any buffering.

      Also, you may like to read about the Voting/Experience System.

        again I suggest listening to no_slogan

        use print