by Alpha01
Remove all blank lines from a file using Perl:
perl -ne 'print unless /^\s+$/ ' test.txt
perl