Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Update: as davorg correctly points out, I had a
strange and (mostly) unnecessary construct. This is my
updated version.
As an explanation: I had the <IN> in a while loop, to take advantage of the diamond operator's auto-assign-to-$_ feature. This code just makes the assignment explicit. Thanks, davorg! This will write a new file with blank lines (where there are two or more newlines together) removed: Variations on this theme (like whitespace, as noted elsewhere in this thread) would be similar... Russ In reply to RE: How do I remove blank lines from text files?
by Russ
|
|