Perlについての質問箱 26箱目
■ このスレッドは過去ログ倉庫に格納されています
0173デフォルトの名無しさん
2006/07/29(土) 21:35:58m?? を m{} に変える。
perldoc perlre に
For reference on how regular expressions are used in matching
operations, plus various examples of the same, see discussions of "m//",
"s///", "qr//" and "??" in "Regexp Quote-Like Operators" in perlop.
とあり、perldoc perlopを見ると
?PATTERN?
This is just like the /pattern/ search,
except that it matches only once between calls to the reset() operator.
This is a useful optimization when you want to see only the
first occurrence of something in each file of a set of files,
for instance. Only ?? patterns local to the current package are reset.
とある。?? は一度マッチしたらreset() を呼ぶまでマッチしないってこと。
■ このスレッドは過去ログ倉庫に格納されています