#!/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