On Sat, 7 Jul 2001, Philip S Tellis wrote:
could you fix your line length?
cant we have listserv(or whatever is used) runnning to fix it, if it
Good idea. I can whip up a quick perl script to do it.
Ok, here's my quick perl script. Took about 5 minutes to write, and about 15 mintes to test well. My test cases are in the attached file. Had to attach the file because it contains long lines that would have been wrapped if pasted into my mail client.
#!/usr/bin/perl -w
use strict; use Text::Wrap;
$Text::Wrap::columns=72;
while(<>) { s/^((?:[>}|%]\s?)+)(\s*)//o; my $leadin = $1 || ""; my $leadin_firstline = $leadin . ($2 || ""); print Text::Wrap::wrap($leadin_firstline, $leadin, $_); }
__END__
This handles a wide variety of mails. See the test cases for examples. Reads from stdin or files passed on the command line, writes to stdout.
Nagarjuna, is it possible to put this into mailman?
Philip