( categories: one liners )
Without saving a backup of the previous file:
perl -ni -e 'print unless /^$/' file
Saving the original file as file.bak:
perl -ni.bak -e 'print unless /^$/' file





