perl -pe 'BEGIN{$/="\n\n";$\="\n"} chomp;' foo.txt
can be shortened to
perl -ple 'BEGIN{$/="\n\n"}' foo.txt
In reply to Re^3: how to use matching operator on newlines
by ikegami
in thread how to use matching operator on newlines
by redss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |