L
Lee
I've been trying to get a fairly simple (should be
going. Mostly a
cut and paste of what the give on the man page. It keeps on coming up
blank for $summary:
use HTML::Summary;
use HTML::TreeBuilder;
my $tree = new HTML::TreeBuilder;
$tree->parse( 'rock.html' );
$tree->dump;
print "\n" . $tree->as_HTML . "\n";
my $summarizer = new HTML::Summary(
LENGTH => 200,
USE_META => 0,
);
$summary = $summarizer->generate( $tree );
print "Summary=" . $summary;
I'm a still a Perl newbie, so forgive the possible stupidity of this
question
btw rock.html exists in the same directory and I can open and read it
in Perl. I'm running from command line and the modules are installed.
Lee
cut and paste of what the give on the man page. It keeps on coming up
blank for $summary:
use HTML::Summary;
use HTML::TreeBuilder;
my $tree = new HTML::TreeBuilder;
$tree->parse( 'rock.html' );
$tree->dump;
print "\n" . $tree->as_HTML . "\n";
my $summarizer = new HTML::Summary(
LENGTH => 200,
USE_META => 0,
);
$summary = $summarizer->generate( $tree );
print "Summary=" . $summary;
I'm a still a Perl newbie, so forgive the possible stupidity of this
question
btw rock.html exists in the same directory and I can open and read it
in Perl. I'm running from command line and the modules are installed.
Lee