in reply to Loop Control
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Loop Control
by slugman (Novice) on Jul 06, 2012 at 00:02 UTC |