Is there anyway easier than this to strip HTML from a string using Perl?
$Error_Msg =~ s|||ig;
$Error_Msg =~ s|||ig;
$Error_Msg =~ s|
You should definitely have a look at the HTML::Restrict which allows you to strip away or restrict the HTML tags allowed. A minimal example that strips away all HTML tags:
use HTML::Restrict;
my $hr = HTML::Restrict->new();
my $processed = $hr->process('i am bold'); # returns 'i am bold'
I would recommend to stay away from HTML::Strip because it breaks utf8 encoding.