#!/afs/athena/contrib/perl/p

while (@ARGV) {
    $file = shift @ARGV;
    open(FILE,"<$file") || die "Can't open file $file: $!";
    $header = 1;
    print "From vm-digest.pl\n";
    while (<FILE>) {
	$header = 1 if /^From /;
	print if ! $header;
	$header = 0 if /^$/;
	print if /^From:|^Date:|^Subject:|^$/;
    }
    close(FILE);
    print "\n";
}
