Removing 3 elements, beginning with element 15 of @array
@array = ( 0 .. 20 );
@array2 = ( A .. F );
print "\@array: @array\n";
print "\@array2: @array2\n\n";
@removed = splice( @array, 15, 3 );
print "removed: @removed\n",
"leaving: @array\n\n";
Related examples in the same category