![]() |
|
more useful options | |
PerlMonks |
Re: Perl's feature to determine, in current point of loop, that this is the last one? (updated: while unpredictable)by LanX (Sage) |
on Jan 23, 2022 at 11:27 UTC ( #11140743=note: print w/replies, xml ) | Need Help?? |
That depends on the loop (for,while,map,...) and the iterated thing. Could you be more specific, or at least point to another language which can do this?
updateHere a counter example to explain one difficulty: Consider a while loop iterating over human input, how should the loop know in advance that the user will stop the input in the next iteration?
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|