in reply to Difference between for and foreach
Using for you can initialize variable, condition check and increment the varaibles like 'C' or like some other languages. foreach is a function having in perl using you can get the array variable and you cannot initialize or condition check or increment like 'for' in a single line.
Gubs
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Difference between for and foreach
by tirwhan (Abbot) on Sep 17, 2007 at 15:31 UTC |