July 2007
Intermediate to advanced
128 pages
2h 39m
English
m// (Matching)
m/PATTERN/imsxocgMatch PATTERN against input string. In list context, returns a list of substrings matched by capturing parentheses, or else (1) for a successful match or ( ) for a failed match. In scalar context, returns 1 for success, or "" for failure. /imsxo are optional mode modifiers. /cg are optional match modifiers. /g in scalar context causes the match to start from the end of the previous match. In list context, a /g match returns all matches, or all captured substrings from all matches. A failed /g match will reset the match start to the beginning of the string, unless the match is in combined /cg mode.