Just did this with the help of "Perl Cookbook" (this book is great).

Chapter 20.6 Extracting or Removing HTML tags

use HTML::Parse;
use HTML::FormatText;
$plain_text = HTML::FormatText->new->format(parse_html($html_text));



Dan Murphy                           [EMAIL PROTECTED]   
EMC Corp.                            508-249-3322
Hopkinton, MA  01748

        EMC˛            
where information lives



-----Original Message-----
From: Paul Tremblay [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 12:11 PM
To: [EMAIL PROTECTED]
Subject: converting html to text


I spent several hours last night trying to convert an html file
to text, so that I could include it in an email.

Someone from a mailing list sent me a simple perl script, which
worked for my purpose.

However, this script simply eleminates tables and lists.

I am wodering if there isn't a CPAN module already written.
Converting html to text seems like such a common task, that there
ought to be some robust scripts out there. Interestingly enough,
I found many scripts to convert html to rtf and LaTeX and every
other format, but not plain old text!

Paul 

-- 

************************
*Paul Tremblay         *
*[EMAIL PROTECTED]*
************************

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

Reply via email to