in reply to how do I line-wrap while copying to stdout?

as for your code
while( $_ = <EMAIL> ) { if ( /^Message-Id:/ || /^Content-Type:/ || /^Content-Disposition:/ || /^Content-Transfer/ || /^X-[-\w]*:/ || /^Status: RO/ || /^Mime-Version:/ ) { next; } . . . }
I'd put the things you want to match the message against into an array and go through that:
@array=qw (Message-ID: Content-Type: Content-Disposition: and_so_on... ); LINE: while( $_ = <EMAIL> ) { foreach $header (@array) { next LINE if /^$header/; } . . . }
The code is untested, so I'm not sure it works... but I hope it helps nevertheless.

BrotherAde