http://www.perlmonks.org?node_id=640337


in reply to Replace text - includes tilde sign?

Try this it will work
perl -i -pe 's#example.com/12.34.56.78#~example#g' *
Gubs