#!/usr/bin/perl -w use strict; my @list = (0, 1, 2, 3, 4, 5, 6, 7); my $ref = [@list[2..4]]; print @$ref;