in reply to A silly splicing question...
splice ARRAY, OFFSET, LENGTH, LIST splice ARRAY, OFFSET, LENGTH splice ARRAY, OFFSET This function removes the elements designated by OFFSET and LENGTH from an array, and replaces them with the elements of LIST, if any. The function returns the elements removed from the array. The array grows or shrinks as necessary. If LENGTH is omitted, the function removes everything from OFFSET onward.I'm not sure (not too familiar with splice) if you could set a length of 0, and do:
splice @a, 2, 0, 'foo'Any takers care to deny or confirm this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: A silly splicing question...
by redcloud (Parson) on Jan 19, 2001 at 05:14 UTC | |
|
Re: Re: A silly splicing question...
by myocom (Deacon) on Jan 19, 2001 at 05:20 UTC |