#!/usr/bin/perl -- use warnings; use strict; use HTML::TreeBuilder; my $html = <<'__HTML__';
and a one two three four
another |one| and another | one |
6 nested font tags 12345654321
__HTML__ { my $h = HTML::TreeBuilder->new_from_content($html); print $h->as_HTML('<>&',' ',{}), "\n"; for my $font( $h->look_down(_tag => q{font}) ){ $font->replace_with_content( $font->content_refs_list ); } print $h->as_HTML('<>&',' ',{}), "\n"; } __END__and a one two three four
another |one| and another | one |
6 nested font tags 12345654321
and a one two three four
another |one| and another | one |
6 nested font tags 12345654321