#!/usr/bin/perl use warnings; use strict; use HTML::TokeParser::Simple; my $html = do{local $/; }; my $p = HTML::TokeParser::Simple->new(\$html); while (my $t = $p->get_token){ next if $t->is_tag(q{font}); print $t->as_is; } __DATA__

one two three

####

one two three

##
## #!/usr/bin/perl use warnings; use strict; use HTML::TreeBuilder; my $html = do{local $/; }; my $h = HTML::TreeBuilder->new_from_content($html); my $para = $h->look_down(_tag => q{p}); my $font = $para->look_down(_tag => q{font}); $font->replace_with($font->as_text); print $para->as_HTML; __DATA__

one two three

##
##

one two three