in reply to strip html tags and special characters in perl while inserting the text in to database.

You could try this:
$_ = "<p>text comes here </p><p>text within after in  attorney’s +fees,  Inc’s principle</p>"; s/<[^>]+>//g; s/[^[:ascii:]]+//g; print;
Have you read anything yet about perl regular expressions (perlretut and perlre)? You should -- the docs are really quite good.
  • Comment on Re: strip html tags and special characters in perl while inserting the text in to database.
  • Download Code