2009-12-25 tr Perl use strict; use warnings; use utf8; use Encode; my $a = "テス\nト"; $a =~ tr{テ スト} {test}; print encode_utf8("$a\n"); の実行結果。 [takeyuki@sunya ~]$ perl tr.pl tset 「テ」→「t」、「\n」→「e」、「ス」→「s」、「ト」→「t」。