CPAN focusses on PERL. PHP and PERL are still a few feet apart.
Check out the regular expressions, they let you replace strings within strings
so you can easily replace all html tags with spaces or whatever you require.
Something like:
$text = preg_replace("/(<.*?>)/"," ",$html);
or
$text = preg_replace("/(<br>)/","\n",$filtered);
btw, this is a PHP function, but you can use PERL regular expressions.