2008年05月11日21:00 カテゴリLightweight LanguagesTips perl - 文字参照を(en|de)codeする すでに正解が書かれていますが、 [を] Unicode の16進数の実体参照を正規表現などで元に戻す pack と Encode::decode を使うと良いみたい。 はてなブックマーク - miyagawaのブックマーク / 2008年05月11日 それ HTML::Entities::decode / regexp でも chr(hex($1)) のほうがわかりやすくないかな 繰り返しておくだけの価値はあるので。 HTML::Entitiesを使う まず、HTML::Entitiesのdecode_entities()を使うという方法があります。これがベストプラクティスかな。 #!/usr/local/bin/perl use strict;
