for my $a ( 1 .. 10 ){ for my $b ( a .. c ){ for my $c ( x .. z ){ do_something($a, $b, $c); } } }