my @array = (1,2,3); remove($array[1]); print join(',', @array); # prints: 1,3