[問題] PERL程式請教
題目:將超過四個字母的英文單字,且結尾是or的話,把or轉換成our
,比如說 color 轉換成 colour。
我這樣寫
chomp($str=<>); $str =~ s/or/our/g if $str =~ m/\S{2,}or /; print $str,"\n";
請問錯在哪裡呢,謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 221.169.94.16
討論串 (同標題文章)
Perl 近期熱門文章
PTT數位生活區 即時熱門文章
6
17