>
> #/!perl -w
> use strict;
> use IO::File;
>
> my $offset = 3;
> my $file_binary = "fg";
> sysopen(OUTFILE, "out.txt", O_WRONLY) or print "Couldn't open file for
> read/write ($!)\n";
> binmode OUTFILE;
> sysseek OUTFILE, $offset, 0;
> syswrite OUTFILE, $file_binary, length($file_binary);
> close OUTFILE;
>
>
> out.txt goes from "1234567" to "123fg67"

Thank you veeery much ! It does what I want too, but I wonder why we have to
make it a binmode
while we are dealing with a text file ? Is that we must treat the FH is a
binary source for
whatever +< or sysread/write ?



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to