The split keyword[edit | edit source]
split splits the EXPRESSION in a list of strings and returns this list. Without EXPRESSION, $_ is used as source. Anything in EXPRESSION that matches PATTERN is taken to be a separator, which may be longer than one character or have even zero length (results in a zero-width match). When separating the EXPRESSION, the separator itself is not added to the strings.
Syntax[edit | edit source]
split /PATTERN/, EXPRESSION, LIMIT split /PATTERN/, EXPRESSION split /PATTERN/ split