Here is a foo
Here is another foo.
Here is a foo in bold
foo.com
####
#!/usr/bin/perl -w
use strict;
use HTML::TokeParser;
my $dir = "c:/windows/desktop/book/";
my $file = $dir."work_index.htm";
my $p = HTML::TokeParser->new($file) || die "Can't open $file: $!";
my %font = (
h1 => '#0000ff',
h2 => '#0000a0',
h3 => '#000060',
h4 => '#000000');
while (my $token = $p->get_tag(qw(h1 h2 h3 h4))) {
my $open = $token->[0];
my $close = '/'.$open;
my $text = $p->get_trimmed_text($close);
print "<$open>$text<$close>\n";
}