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.
|
---|
In Section
Cool Uses for Perl