perl -e"BEGIN{$/=qq[\n\n]}" -ne"chop;print" junk.txt