use strict; use warnings; use feature qw/say/; my @array = qw/0 1 2 3 4 5 6 7 8 9 10 11 12/; for ( my $idx = 0; $idx < @array; $idx += 3 ) { say $array[$idx]; }