if( $i == 0 ) { for my $w ( @Nc ) { } } else { for my $w ( @Nc ) { } }
Or since the loops themselves are the same, differing only in their content:
for my $w ( @Nc ) { if( $i == 0 ) { # First pass actions } else { # Subsequent pass actions. } }
By the way, the code you posted doesn't compile.
Dave
In reply to Re: Loop Control
by davido
in thread Loop Control
by slugman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |