正規表現道場@2ch

このエントリーをはてなブックマークに追加
44名無しさん@お腹いっぱい。
my $tmp = "pattern";
my $count = ($tmp =~ s/t/T/g);
print "$count 個の t を T に置換しました\n";

こんな感じ?