in reply to Read text from HTML file and display it

Depending upon the complexity of the html, you may find that HTML::Scrubber will do what you need:

use strict; use warnings; use File::Slurp qw/read_file/; use HTML::Scrubber; my $html = read_file 'text.txt'; my $scrubber = HTML::Scrubber->new(); print $scrubber->scrub($html);

File::Slurp was only used to read the file's contents into a scalar.

Hope this helps!