There are some sources that names the loop variable as the "iterator"

Indeed and that's probably an unfortunate choice of term in that article also but context is an important thing.

FWIW, many years ago when I was learning to code we were taught that the variable which increments on each turn through a loop was termed the "control variable". That is the name I still use today. You may see it used for other meanings but always (so I've found) where its value performs some equivalent mechanism. Nobody has complained to me about this name when I've used it. Up to now, anyway. :-)


🦛


In reply to Re^3: Access a global variable from a subroutine when used as "for" iterator by hippo
in thread Access a global variable from a subroutine when used as "for" iterator by vitoco

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.