in reply to Perl's feature to determine, in current point of loop, that this is the last one?

Is eof what you're after?

If not, please provide some sample code such that we have a better idea of what you're looking for. See "How do I post a question effectively?".

— Ken