模式匹配修飾符

用/i進行大小寫無關的匹配 use 5.010; print "Would you like to play a game?"; chomp($_=<STDIN>); if (/yes/i) { say "In that case,I recommend that you to bowling."; } 用/s匹配任意字符 默認狀況下,點號(.)沒法匹配換行符,若是但願點號能匹配這些換行符
相關文章
相關標籤/搜索