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
In reply to Re: remove a blank line after a string
by davido
in thread remove a blank line after a string
by johnajb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |