Perl Primer - University of California, Davis

The most basic type of determinate loop is the for loop. Its basic structure is: Note the syntax similar to the syntax of an if statement: the : at the end of the condition, and the indentation of the code block. A for loop is simple: it loops over all possible values of variable as … ................
................