$ perl --version
This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi
$ echo -e "foo
bar" > baz.txt
$ perl -p -e 's/foo
bar/FOO
BAR/m' baz.txt
foo
bar
How can I get this replacement to work?
See Question&Answers more detail:os