in reply to mysterious regexp syntax
$ man perlop : : If "/" is the delimiter then the initial "m" is optiona +l. With the "m" you can use any pair of non-whitespace (ASCII) characters as delimiters. This is particularly useful +for matching path names that contain "/", to avoid LTS (lea +ning toothpick syndrome). If "?" is the delimiter, then a m +atch- only-once rule applies, described in "m?PATTERN?" below +. If "'" is the delimiter, no interpolation is performed on +the PATTERN. When using a character valid in an identifier +, whitespace is required after the "m". : : m?PATTERN?msixpodualgc ?PATTERN?msixpodualgc This is just like the "m/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 "m??" patterns local to the current pa +ckage are reset.
Enjoy, Have FUN! H.Merijn
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: mysterious regexp syntax
by grizzley (Chaplain) on Feb 04, 2014 at 10:29 UTC | |
by Athanasius (Archbishop) on Feb 04, 2014 at 12:51 UTC |
In Section
Seekers of Perl Wisdom