bobafifi has asked for the wisdom of the Perl Monks concerning the following question:
Can somebody please tell me the syntax to do a find/replace command that includes a tilde sign as part of the string output? For example:
getting compilation errors -- desired output of the above (to replace example.com):
12.34.56.78/~example
perl -i -pe 's/example\.com/12\.34\.56\.78/~example/g' *
getting compilation errors -- desired output of the above (to replace example.com):
12.34.56.78/~example
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Replace text - includes tilde sign?
by Corion (Patriarch) on Sep 21, 2007 at 11:20 UTC | |
by bobafifi (Beadle) on Sep 21, 2007 at 11:40 UTC | |
Re: Replace text - includes tilde sign?
by dwm042 (Priest) on Sep 21, 2007 at 11:39 UTC | |
Re: Replace text - includes tilde sign?
by johngg (Canon) on Sep 21, 2007 at 11:23 UTC | |
Re: Replace text - includes tilde sign?
by gube (Parson) on Sep 21, 2007 at 11:29 UTC |
Back to
Seekers of Perl Wisdom