removes m elements starting at position n from @array and splices in the contents of @insert.
@array - the array to mangle up
@insert - the array to insert into @array, a $null value is ok
n - the position of @array to splice into, default value is 0
m - the number of elements to remove from @array, starting at position n. default value is the size of @insert
@array
@array = @("a", "b", "c", "d", "e"); @insert = @(1, 2, 3); # start at element 2; remove 1; insert @insert splice(@array, @insert, 2, 1); println(@array);
@('a', 'b', 1, 2, 3, 'd', 'e')