Sometime Today, Philip S Tellis assembled some asciibets to say:
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.
And here's the one line version of the same program:
% perl -MText::Wrap=wrap,$columns -pe 'BEGIN {$columns=72} s/^((?:[>}|%]\s?)*)(\s*)(.+)$/wrap(($1||"").($2||""), $1||"", $3)/goose'
You can put all this on one line, and either pass it a file as an argument, or pipe the output to it:
% cat long_lines.txt | perl -MText::Wrap=wrap,$columns -pe 'BEGIN {$columns=72} s/^((?:[>}|%]\s?)*)(\s*)(.+)$/wrap(($1||"").($2||""), $1||"", $3)/goose'
or
% perl -MText::Wrap=wrap,$columns -pe 'BEGIN {$columns=72} s/^((?:[>}|%]\s?)*)(\s*)(.+)$/wrap(($1||"").($2||""), $1||"", $3)/goose' long_lines.txt
Works where I've tested it.
Philip