6 HTML::Parser->new(start_h => [ \&start_lc, "tokenpos, text" ],
7 end_h => [ sub { print lc shift }, "text" ],
8 default_h => [ sub { print shift }, "text" ],
10 ->parse_file(shift) || die "Can't open file: $!\n";
13 my($tpos, $text) = @_;
14 for (my $i = 0; $i < @$tpos; $i += 2) {
15 next if $i && ($i/2) % 2 == 0; # skip attribute values
16 $_ = lc $_ for substr($text, $tpos->[$i], $tpos->[$i+1]);