$ perl -wE 'say grep {state $t ^= 1} qw[a b c d]' ac $

In reply to Re^2: Mini-Tutorial: Working with Odd/Even Elements by JavaFan
in thread Mini-Tutorial: Working with Odd/Even Elements by ikegami

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":