I want to run a perl script from the command line to translate double newlines to single newlines but it's not working. What is wrong with this code?
perl -p -i -e 's/\n\n/\n/g;' foo.txt
In reply to how to use matching operator on newlines by redss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |