I would suggest, if this isn't a one-time thing, that a better approach to automatically editing important files is not to do that. I prefer instead to generate them from an authoritative, structured source. This combines nicely with generating them and the distributing them to multiple hosts.
I've found that automatic editing often becomes automatic mutilation. If you store the data in a structured form (think database), you can do interesting reporting and searching as well.
If you do go this route, make sure your restore process works first.
In reply to Re: Perl search and replace
by thargas
in thread Perl search and replace
by austin43
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |