use strict; use warnings; for (my $i = 1; $i <= 15; $i++) { print (($i % 2) == 0 ? "[Even]" : "[Odd]", $i, "\n"); }