Perl一行命令删除空行 2014 年7 月24 日 Here below is the one-liner I found to remove a blank line in a file. 1 perl -pi -e 's!^\s+?$!!' file.txt