use strict; my @array = (0..999); # retrieve only the first 10 elements: my @top_ten = @array[0..9]; print "$_\n" for @top_ten;