http://www.perlmonks.org?node_id=132959


in reply to (code) One-liner removes whitespace-only lines from text file

perl -i.bak -ne 'print if /\S/' file.txt

Seems a bit more intuitive to me :)

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.