split

split /PATTERN/,EXPR,LIMITsplit /PATTERN/,EXPRsplit /PATTERN/ split
This function scans a string given by
EXPR for separators, and splits the string
into a list of substrings, returning the resulting list value in list
context or the count of substrings in scalar context.[249] The separators are determined by repeated pattern
matching, using the regular expression given in
PATTERN, so the separators may be of any size
and need not be the same string on every match. (The separators are not
ordinarily returned; exceptions are discussed later in this section.) If
the PATTERN doesn’t match the string at all,
split returns the original string as
a single substring. If it matches once, you get two substrings, and so
on. You may supply regular expression modifiers to the
PATTERN, like /PATTERN/i, /PATTERN/x, etc. The //m modifier is assumed when you split on the
pattern /^/.
If LIMIT is specified and positive, the
function splits into no more than that many fields (though it may split
into fewer if it runs out of separators). If
LIMIT is negative, it is treated as if an
arbitrarily large LIMIT has been specified.
If LIMIT is omitted or zero, trailing null
fields are stripped from the result (which potential users of pop would do well to remember). If
EXPR is omitted, the function ...