for my $i (0..$size-1){ my $i_col = $i%0xFF; my $i_mod20_9 = $i%20>9; for my $j (0..$size-1){ $USE[$i][$j] = $i_mod20_9^($j%20>9) ? $reds[$i_col] : $greens[$j%0xFF]; } }