in reply to Re^2: opening file for editing
in thread opening file for editing
you can do this in two steps:
read open dump all to a variable (in memory) apply a substitution to this variable close re-open the file, now for writing print the changed variable to the file (overwrite the whole file) and close again
No temp files here, and your file is updated as you want. Use perldoc for the details.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: opening file for editing
by Anonymous Monk on Oct 09, 2011 at 11:50 UTC | |
by keszler (Priest) on Oct 09, 2011 at 12:59 UTC | |
by Anonymous Monk on Oct 09, 2011 at 14:19 UTC | |
by exilepanda (Friar) on Oct 10, 2011 at 01:15 UTC |