in reply to Make array from field of another array

Slices
use warnings; use strict; use Data::Dumper; my @all_nums = 0 .. 9; my @few_nums = @all_nums[4 .. 6]; print Dumper(\@few_nums); __END__ $VAR1 = [ 4, 5, 6 ];

See also grep