> Hi all, I could use some help with an expression or code to delete
> multiple blank lines and replace it with only one blank line...
> 
> I know how this can be done in sed, but am not sure how to do it in
> perl...
> 
> Thanks,
> Taylor

Well you could do this the simple way, use a switch that toggles on/off
whether the last line you checked was empty.  If the switch is on, and
the current line is empty simply skip it. If the switch is off and the
current line is empty then keep it, toggle the switch and move on.

KISS,

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to