批踢踢實業坊
›
看板
Perl
關於我們
聯絡資訊
返回看板
作者
nimmal (論文便祕ing)
看板
perl
標題
[問題] PERL程式請教
時間
Fri Jun 24 00:19:19 2005
題目:將超過四個字母的英文單字,且結尾是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