Perl code to remove blank lines from a text file

Remove blank lines from a text file with a single line of perl:  perl -ni.bak -e ’s/^\s*$//’ filename

Author: rbocchinfuso on February 21, 2010
Category: Perl, Source

Leave a Reply

CAPTCHA image

Last articles

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

This site is protected with Urban Giraffe's plugin 'HTML Purified' and Edward Z. Yang's Powered by HTML Purifier. 307 items have been purified.