in reply to Reading and *writing* configuration files

I don't know anything about the file format, but I'm assuming that you take the file and have it in some kind of parsed state (LoH perhaps?). Have you considered using something like Algorithm::Diff to compare your changed file to the original and only outputting lines that have changed.

Config::IniFiles tries to preserve comments but I'm not sure how well this works.

Hope this helps...

gav^

  • Comment on Re: Reading and *writing* configuration files

Replies are listed 'Best First'.
Re: Re: Reading and *writing* configuration files
by Anonymous Monk on Apr 09, 2002 at 14:54 UTC
    Hmmm.. those are not bad ideas. I don't know why I didn't think of Algorithm::Diff. I'll look at Config::IniFiles first to see if I can steal any ideas, then checkout Algorithm::Diff and see if it can be of any help.

    thanks!