Welcome to the Monastery | |
PerlMonks |
Re: remove single blank lines?by Roger (Parson) |
on Dec 09, 2003 at 00:24 UTC ( [id://313316]=note: print w/replies, xml ) | Need Help?? |
Here's my implementation - Consider the string below - What the regex will do is to get rid of the '\n' at the end of line1, which is followed by another \n and a word boundary. This solution is similar to qq's answer above, but with subtle differences. qq's solution will replace two consecutive \n's with a single \n, while my solution will get rid of the first \n.
In Section
Seekers of Perl Wisdom
|
|