in reply to I need a different continue
update: equivalent with shiftwhile (my $value = $it->next()) { # stuff if ($it->has_next()) { # for all but the last value } }
update2: fixed logic error: s/unless/if/; - sorry about that.while (@array) { my $value = shift @array; # stuff if (@array) { # for all but the last value } }
|
|---|