http://www.perlmonks.org?node_id=1027341


in reply to Print from array element to another array element

G'day Dr Manhattan,

What you're attempting to use here are called Array Slices. They take the form: @array_name[<list of indices>]. See perldata - Slices. Your code should look something like this:

$ perl -Mstrict -Mwarnings -E ' my $word = q{catfood}; my @array = split // => $word; say join q{} => @array[3 .. $#array]; ' food

-- Ken