1 2 3 4 5 6 7 8 9 10
use strict; use warnings; for my $x(1..10){ for my $y(1..10){ for my $z(1..10){ print "$x, $y, $z\n" if $x + $y + $z == 12 } } }