in reply to Re: Write to file
in thread Write to file

I thought seek was only to find the beginning and/or end of a file?

Replies are listed 'Best First'.
Re^3: Write to file
by Fletch (Bishop) on Oct 17, 2005 at 19:01 UTC

    seek will allow you to position the file pointer to any offset within the file. The problem is that files are ordered sequences of octets, not lines. Unless you're dealing with fixed line lengths you're more than likely going to overwrite something if you try and do things in place yourself. You want to use the module mentioned in the FAQ I've referenced.