Text::Autoformat was featured in the last issue of The Perl Journal (which
is unfortunately not on-line at the moment).

For a third-party (and free!) tool, try eCleaner at
http://members.tripod.com/schin26/index.htm.


_______________________________________________________
Stephan Gross       Loral Skynet     908-470-2388     [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 



-----Original Message-----
From: Humberto Varela [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 5:24 PM
To: [EMAIL PROTECTED]
Subject: cleaning up forwarded, inline email messages with Perl?


following some threads on regex matching on this list, i was able to write
some one-liners in Perl that cleaned up forwarded messages that i typically
see in list emails.

so, you turn something like:

>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

into:

 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

into:

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

but, rather than peck out simplistic pattern-matching code ala sed or awk, i
was wondering if some Perl tools exist already that help re-format inline
messages.

hell, even sharing a personal perl script that cleans up messages would be
appreciated.

my next project (while squeezing in my normal work routine, of course : P )
is to filter inline forwarded messages so that they not only remove angle
brackets, and left-indent, but also have only one blank line between
"paragraphs".

my embarrasingly simple problem is how to tell a snippet of pattern-matching
perl code what a "paragraph" is...

anyhow, i guess i'm asking 3 questions:

1) is there some good message filtering Perl code flying around out there?
2) how to define a "paragraph" in Perl script (so as to act on the stuff
_after_ a paragraph is encountered).
3) where is a near-comprehensive listing of pattern-matching code for Perl
scripts on the web?  for example, i would never have figured out the '^M'
filter to be 'cM' as one poster suggested, or even '\r' as someone else
suggested.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to