Re: multiple lines / success or failure?!
From: Joe Smith (Joe.Smith_at_inwap.com)
Date: 03/31/04
- Next message: Joe Smith: "Re: validate links??"
- Previous message: Vorxion: "Re: Lost data on socket - Can we start over politely?"
- In reply to: Geoff Cox: "multiple lines / success or failure?!"
- Next in thread: ko: "Re: multiple lines / success or failure?!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Mar 2004 10:43:51 GMT
Geoff Cox wrote:
> I have not tried HTML::Parser yet as I cannot find any help info to
> get me started.
#!/usr/bin/perl -w
# Name: nohtml Author: Joe.Smith@inwap.com 07-Nov-2001
# Purpose: Extracts just the text portions of a document.
use strict;
use HTML::Parser ();
sub text_handler { # Ordinary text
print @_;
}
my $p = HTML::Parser->new(api_version => 3);
$p->handler( text => \&text_handler, "dtext");
$p->parse_file(shift || "-") || die $!;
1;
- Next message: Joe Smith: "Re: validate links??"
- Previous message: Vorxion: "Re: Lost data on socket - Can we start over politely?"
- In reply to: Geoff Cox: "multiple lines / success or failure?!"
- Next in thread: ko: "Re: multiple lines / success or failure?!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|