Subject: | documentation bug w/r/t splice usage |
From the synopsis:
# Insert based on a binsearch_pos return value.
splice @num_array, $index, 1, 600
if( $num_array[$index] != 600 ) #Insertion at [5]
The third argument to splice should be 0, since putting 1 will make it replace an element, not insert.