How big is huge? Nowadays, I think the "read all, manipulate, write  
all" technique is probably the best for text files up to many megabytes.

Regards, Morton

On Jul 17, 2006, at 10:31 PM, Xavier Hanin wrote:

> But I still don't know how to edit a file while reading it. I've made
> further googling on the subject, and the only solutions I find are:
> - "read all, manipulate, write all", which doesn't seem very good with
> huge files
> - use -i options with ruby command line, but this seems to work only
> with files passed on the command line, which isn't my case.