... when i need it to do this ...
I'm not really sure where you're going with this, but maybe something like the following can serve as a point of departure:
c:\@Work\Perl\monks>perl -wMstrict -e "for my $i (0 .. 3) { for my $j (0 .. 3) { print qq{system command \$i $i, then for \$j $j \n}; } } " system command $i 0, then for $j 0 system command $i 0, then for $j 1 system command $i 0, then for $j 2 system command $i 0, then for $j 3 system command $i 1, then for $j 0 system command $i 1, then for $j 1 system command $i 1, then for $j 2 system command $i 1, then for $j 3 system command $i 2, then for $j 0 system command $i 2, then for $j 1 system command $i 2, then for $j 2 system command $i 2, then for $j 3 system command $i 3, then for $j 0 system command $i 3, then for $j 1 system command $i 3, then for $j 2 system command $i 3, then for $j 3
Update: Then maybe something along the lines of:
c:\@Work\Perl\monks>perl -wMstrict -e "for my $i (0 .. 3) { INNER: for my $j (0 .. 3) { next INNER if $i == $j; print qq{system command \$i $i, then for \$j $j \n}; } } " system command $i 0, then for $j 1 system command $i 0, then for $j 2 system command $i 0, then for $j 3 system command $i 1, then for $j 0 system command $i 1, then for $j 2 system command $i 1, then for $j 3 system command $i 2, then for $j 0 system command $i 2, then for $j 1 system command $i 2, then for $j 3 system command $i 3, then for $j 0 system command $i 3, then for $j 1 system command $i 3, then for $j 2
Give a man a fish: <%-(-(-(-<
In reply to Re: how to repeat a if else statement in a nested for loop
by AnomalousMonk
in thread how to repeat a if else statement in a nested for loop
by ajl412860
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |