Think about Loose Coupling | |
PerlMonks |
Re: Edit File in placeby spurperl (Priest) |
on Aug 13, 2002 at 13:23 UTC ( [id://189779]=note: print w/replies, xml ) | Need Help?? |
Reading the file, modifying and writing back is really not so bad of a solution. Especially if there is a lot to change, as seems to be in your case.
IMHO, this provides a clean solution (you can have a backup of the original file easily, for exmaple), that is relatively easy to implement.
So, unless you have a very special case in which you *must not* read-process-write the file, use this solution.
In Section
Seekers of Perl Wisdom
|
|