DocTaur - intranet directory of reference manuals
Yo-store
books for webmasters

reference manuals search engine

Perl Tutorial Book

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.6 The for Structure

The for structure works similarly to the for structure found in C, C++ or Java. It is really syntactic sugar for the while statement.

Thus:

 
use strict;
for(Initial_Statement; expression; Increment_Statement) {
    For_Statement;
    For_Statement;
    For_Statement;
}

is equivalent to:

 
use strict;
Initial_Statement;
while (expression) {
    For_Statement;
    For_Statement;
    For_Statement;
    Increment_Statement;
}

This document was generated on July, 31 2004 using texi2html 1.70.