in reply to A Better Way
I also don't see why you need to replace each newline with replace, and then later on do the reverse substitution.
It seems to me your whole script could be replaced by
$ perl -i -pe 's/the line to be replaced/this is the new line/' var.tx +t
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A Better Way
by toniax (Scribe) on Nov 04, 2010 at 16:54 UTC | |
by moritz (Cardinal) on Nov 05, 2010 at 06:50 UTC | |
by toniax (Scribe) on Nov 05, 2010 at 17:15 UTC |