You will find some ideas in A better (ie.more concise) way to write this?.
Like this:
my $i = 0; my $j = 1; for( 1..10 ){ ( $i+=1 ) %= 4; ( $j-=1 ) %= 4; printf "%d %d\n", $i+1, $j+1; }
In reply to Re: "Round Robin" variable range?
by hdb
in thread "Round Robin" variable range?
by Salamihawk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |