I'd like to replace all occurrences of this in a file:
ab
ba
With this:
a a
I tried the obvious:
$ perl -i -p -e 's/ab\nba/a a/' file.txt
With no success. How is this done?
I can't find any questions that properly articulate this question.