in reply to Re^4: remove a blank line after a string
in thread remove a blank line after a string
Maybe like this? (I'm sure you could come up with something yourself if you thought about it)
my $msg = $pop->get($msgnum); LOOP: for ( 0 .. $#{$msg} ) { unless( $msg->[$_] =~ m/\QContent-Transfer-Encoding: 7bit\E/i ) { print OUTFILE $msg->[$_]; next LOOP; } splice( @{$msg}, $_ + 1, 1 ) if $msg->[ $_ + 1 ] =~ m/^\s+$/; # delete # This is probably a mistake. Delete what? And where's +the semicolon? last LOOP; }
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: remove a blank line after a string
by johnajb (Novice) on Feb 19, 2005 at 14:32 UTC |