|
|
For Statement in Perl - Perl
|
Views : 261
|
|
Tagged in : Perl
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
For Statement in Perl
The for statement performs a loop as long as a a tested expression is true, increasing the value for each loop.
for ( initial_expression; test_expression; increment_expression ) {
statement1;
statement2;
}
The following example prints the numbers 1 to 10.
for ($i = 1; $i <=10; $i++) {
print "$i ";
}
|
|
By Geethalakshmi, On - 2010-09-17 |
|
|
|