Programming Tips - How do I delete an element from a perl array?

Date: 2010feb11 Created: 2009jul4 Language: perl Q. How do I delete an element from a perl array? A. To delete element $i from array @a do this:
splice(@a, $i, 1);
This will decrement the number of elements in your array by 1. There is also a "delete" command in perl but it does not do quite this. Note that splice() works in-place. So do NOT do this:
@a = splice(@a, $i, 1); # WRONG, WRONG, WRONG