in reply to Re^2: remove a blank line after a string
in thread remove a blank line after a string
Ok, I misunderstood. This should do the trick:
for ( 0 .. $#{$msg} ) { next unless $msg->[$_] =~ m/\QContent-Transfer-Encoding: 7bit\E/i; splice( @{$msg}, $_ + 1, 1 ) if $msg->[ $_ + 1 ] =~ m/^\s+$/; last; }
This scans through the message until it finds the "Content-Transfer-Encoding: 7bit" string. The next line is then checked to see if it is blank except for whitespace, and if it is, it's deleted. And since we're done looking for the blank line, the loop is exited.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: remove a blank line after a string
by Roy Johnson (Monsignor) on Jan 27, 2005 at 03:40 UTC | |
|
Re^4: remove a blank line after a string
by johnajb (Novice) on Jan 26, 2005 at 18:27 UTC | |
|
Re^4: remove a blank line after a string
by Your Mother (Archbishop) on Jan 27, 2005 at 00:28 UTC | |
by davido (Cardinal) on Jan 27, 2005 at 06:18 UTC | |
|
Re^4: remove a blank line after a string
by johnajb (Novice) on Feb 19, 2005 at 01:06 UTC | |
by davido (Cardinal) on Feb 19, 2005 at 05:38 UTC | |
by johnajb (Novice) on Feb 19, 2005 at 14:32 UTC |