Is there any reason not to just use Config::IniFiles to do the editing as well as reading? From the docs it look like you want...
$cfg->setval ($host,$fn, $value);
Of course you need to handle loading and saving the file agian as well. As for why your code doesn't work, it looks like you open a single file and read from it. Try opening the file to read from, and the temp file to write to. Then copying the temp file over the old file after closeing them both.
In reply to Re: In-place editing in a script
by eric256
in thread In-place editing in a script
by rjoost
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |