for my $w ( @Nc ) { if( $i == 0 ) { # First pass actions } else { # Subsequent pass actions. } }