Perls three-argument for loop is exactly like in C: initializer, test, and counting. See also http://en.wikipedia.org/wiki/For_loop#Three-expression_for_loops. Other languages may implement for loops differently, notably BASIC and its derivates often have constructs like for i=1 to 100 step 3 (counting up from 1 with increments to 3 until 100 is reached or exceeded) or even for i=100 downto 1 step 3 (counting down in steps of 3, starting at 100, stopping when 1 is reached or exceeded). Other languages have even stranger for loops, see the wikipedia article.
Alexander
In reply to Re^3: For loop trouble
by afoken
in thread For loop trouble
by cheech
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |