#!/usr/local/bin/perl # # lean - cut out the fat of email/news messages: # the headers and the signature. # # The message must start with headers, separated by the body by a # blank line. The signature must be separated from the body by a line # containing only two dashes and an optional space. $header=1; exit unless ($_ = <>); # skip header while (! /^$/) { exit unless $_ = <>; } # print everything until signature marker while (($_=<>) && (! /^-- ?$/)) { print; }