in reply to Re^3: remove a blank line after a string
in thread remove a blank line after a string

Seems a bit complex for filtering an array, yeah? Will something this work? (Can't test it myself right now.)

my @msg = grep /\S/, @{$pop->get($msgnum)}; # then the @{$msg} stuff has to change, of course

Replies are listed 'Best First'.
Re^5: remove a blank line after a string
by davido (Cardinal) on Jan 27, 2005 at 06:18 UTC

    That would remove all blank lines, which may be ok with the OP, but doesn't sound all that desirable to me. I would think that one would want to keep the message content intact.

    Perhaps it's complex, but my solution does only remove one blank line, and that line can only follow the "Content-type" line. I'll admit the range operator would have been more elegant though.


    Dave