in reply to Re^2: Access a global variable from a subroutine when used as "for" iterator
in thread Access a global variable from a subroutine when used as "for" iterator

Naming conventions in Computer Science are fuzzy and often depend on the languages which are currently en vogue. This is causing many problems because often concepts can't be mapped one-to-one

In this case:

A loop counter is sometimes also referred to as a loop iterator. A loop counter, however, only provides the traversal functionality and not the element access functionality.

There is also the term "external iterator"

IMHO the term "loop var" is the safest in a Perl context.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

  • Comment on Re^3: Access a global variable from a subroutine when used as "for" iterator