#!/usr/local/bin/perl -w use strict; my @a=qw(las vegas every saturday night third is my element); my $leng= @a; my $i; print "the index of the array is $leng. \n"; for ($i=0; $i <= $leng; $i++) { if (($i+1)%3==0) { print "$a[$i] "; } }