[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Easy way to cut body of email in perl



A snippit of junk code that you can tweak for various purposes. 


        while(<IN>) {
                if (/^From:/) { $from = "T" ; } ;  
                if(/^Return-Path:/ | /^Received:/ | /^Message-/ | /^Date:/  | /^X-/ ) {
                        # do nothing 
                } else {
                        if ($from eq "T") {
                        print OUT "$_" ;
                        } ;
                }
        } ;