HTMLタグの除去をPerl演算子の置換処理で生成
Perl言語の置換演算子を使用して、HTMLタグの除去を正規表現で実行しました。
#!/opt/local/bin/perl
use strict;
use warnings;
use utf8;
print "Content-type: text/html; charset=utf-8\n\n";
my $html = "<abbr title="Open Graph protocol">OGP</abbr>";
$html =~ s/<.*?>//gi
print $html;
exit;
OGP
サンプルコードと出力結果です。HTMLタグを削除して出力しました。