for (1 .. 4) { if ($_ % 2) {print "odd"} # Assume 'once only blocks' else {print "even"} }