I have a document containing blank lines (\ n \ n). They can be removed with sed:
echo $'a\n\nb'|sed -e '/^$/d'
But how to do this with regular regular expression in perl? Everything that looks like the following simply does not show any result.
echo $'a\n\nb'|perl -p -e 's/\n\n/\n/s'
regex perl
Simon A. Eugster
source share