sub display_email { my ($fn) = @_; print "
file $fn
\n"; if ( open( EMAIL, $fn ) ) { print "

\n
";
        while( $_ =   ) {
            if (        /^Message-Id:/
                 ||     /^Content-Type:/
                 ||     /^Content-Disposition:/
                 ||     /^Content-Transfer/
                 ||     /^X-[-\w]*:/
                 ||     /^Status: RO/
                 ||     /^Mime-Version:/ ) {
                next;
            }
            if (        /^\s/ && $rcvdflag ) {
                next;
            }
            if (        /^Received:/ ) {
                $rcvdflag = 1;
                next;
            }
            if (        /^[^ ]/ ) {
                $rcvdflag = 0;
            }
            if ( length($_) > 80 ) {
                chop;
                do {
                    print substr( $_, 0, 80 ) . "\n";
                    if (length($_) > 80) {
                        $_ = substr( $_, 80, length($_) - 80 );
                    }
                    else {
                        $_ = "";
                    }
                } while length($_);
            }
            else {
                print $_;
            }
        }
        print "
\n"; close( EMAIL ); } }