in reply to Update in-place with temporary file and flocking

why can't you modify it in memory and then write it straight to the first file?? just a thought, rune
  • Comment on Re: Update in-place with temporary file and flocking

Replies are listed 'Best First'.
Re: Re: Update in-place with temporary file and flocking
by geohar (Acolyte) on Feb 18, 2004 at 16:46 UTC
    It's potentially large, and though I could use XML::SAX events to build the whole thing in memory, I'd rather not. Furthermore, only some of the information in the file is of interest/needs altering - the rest needs to just be left alone, so streaming it though as a copy-file-like operation seems like a good idea, rather than using up memory.