in reply to Elegantly Selecting Every 3rd Element in an Array.

Well, I realize that this has been answered to death, but heres a solution along a very different line, which also offers some extra flexibility.

#!/usr/local/bin/perl -w use strict; use Tie::Cycle; $\=$/; my @a=qw(want vegas every first night third array my element); tie my $ok,'Tie::Cycle',[0,0,1]; $ok && print $_ foreach @a;
The flexibility of this approach can be seen by changing [0,0,1] to [1,0,1].

Of course I'm not really sure why anyone would _want_ to do anything like this, but you never know what'll come up...

:-)

Yves
--
You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)