How would i write the lines prior to the deleted blank line to a file?
my $msg = $pop->get($msgnum); for ( 0 .. $#{$msg} ) { next unless $msg->[$_] =~ m/\QContent-Transfer-Encoding: 7bit\E/i; splice( @{$msg}, $_ + 1, 1 ) if $msg->[ $_ + 1 ] =~ m/^\s+$/; delete last; }
Code tags and formatting added by davido. Please read Writeup Formatting Tips.
In reply to Re^4: remove a blank line after a string
by johnajb
in thread remove a blank line after a string
by johnajb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |