Using the HTML::Strip Perl extension
Stripping HTML/XML/SGML
Example demonstrating how to use the HTML::Strip Perl extension for stripping HTML markup from text.
The results may not perfectly remove all HTML depending on the complexity of your markup.
strips HTML-like markup from text in a very quick and brutal manner. You can also use the extension
to strip XML or SGML from text.
Code
#!/usr/bin/perl use HTML::Strip;