in reply to remove a blank line after a string
Adding one line will do it. I'll demonstrate:
my $msg = $pop->get($msgnum); pop @{$msg} if $msg->[-1] =~ /^\s+$/; # This is the additional line. print MAILBOX @$msg;
That assumes that your description of the problem is correct; that there is one blank line at the end of the message, with nothing but whitespace in it (whitespace includes \n). This will essentially eliminate that last line if it only contains \s character(s).
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: remove a blank line after a string
by johnajb (Novice) on Jan 26, 2005 at 18:05 UTC | |
by davido (Cardinal) on Jan 26, 2005 at 18:25 UTC | |
by Roy Johnson (Monsignor) on Jan 27, 2005 at 03:40 UTC | |
by johnajb (Novice) on Jan 26, 2005 at 18:27 UTC | |
by Your Mother (Archbishop) on Jan 27, 2005 at 00:28 UTC | |
by davido (Cardinal) on Jan 27, 2005 at 06:18 UTC | |
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 |