On Thursday, April 4, 2002, at 01:19 , murphy, daniel (BMC Eng) wrote:

> 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));

I tried that, running perl 5.6.1
        HTML::Parser -  3.26
        HTML::FormatText -  1.18
        HTML::TreeBuilder -  3.11

and I had to do

### #!/usr/bin/perl
###
### use HTML::Parser;
### use HTML::FormatText;
### use HTML::TreeBuilder;
###
### my $html_text;
### my $filename = $ARGV[0];
### open(FH, $filename) or die "unable to open file $filename :$!\n";
### while (<FH>) { $html_text .= $_ ; }
### ###my $plain_text = 
HTML::FormatText->new->format(parse_html($html_text));
### my $tree = HTML::TreeBuilder->new->parse($html_text);
### my $plain_text = HTML::FormatText->new->format($tree);
###
### print "$plain_text\n";
###

because it was not able to find the parse_html.

is that in some other Version???

ciao
drieux

---


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

Reply via email to