|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re: Difference between for and foreachby gube (Parson) |
| on Sep 17, 2007 at 15:08 UTC ( #639422=note: print w/ replies, xml ) | Need Help?? |
|
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
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||