Synopsis:
   $splice(<variable name> <index> <count> [<text>])

Technical:
   This function modifies the variable $<variable name> by substituting
   for the <index> through <index>+<count>th words the string of <text>.
   The words that are removed are the return value of the function.
   The variable name must be a variable name and must not be prefixed with
   a dollar sign.  <Text> may be the empty string, in which case the words
   are simply removed.

Practical:
   This function is useful for changing parts of a string without
   rewriting the whole thing.  Used in conjunction with the matching
   functions, it can serve as a search-and-replace function that operates
   on whole words ($sar() operates on individual characters).

Returns:
   The <index> through <index>+<count>th (counting from 0) words from the
   variable $<variable name>.

Examples:
   @ foo = [one two three four five]
   $splice(foo 1 3 foo bar blah)       returns "two three four"
   $splice(foo 0 2)                    returns "one foo"
   $splice(foo 2 1)                    returns "five"
   echo $foo                           shows "bar blah", end result

See Also:
   sar(6)

