in reply to Re: Is it possible to alter a flat file in memory?
in thread Is it possible to alter a flat file in memory?
The magic of the -i doesn't preclude the file from being opened, read, written, and closed does it?
I thought it opened the original file, wrote a new temporary file as it modified lines as appropriate, and then overwrote the original by moving the temporary file in place.
If that really isn't how it works under the hood - please let me know. I think for all intents and purposes, it meets the OP's needs. Besides - Tie::File has to read the entire file to index the newlines as well for the array - or am I wrong about that too?
No need to reply if my assumptions are correct - thanks.
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Is it possible to alter a flat file in memory?
by broquaint (Abbot) on May 21, 2003 at 23:38 UTC | |
by Limbic~Region (Chancellor) on Apr 12, 2006 at 14:50 UTC |