http://qs321.pair.com?node_id=791914


in reply to Re: for loop syntax difference
in thread for loop syntax difference

I believe the "for" in the docs refers to a C-style loop (for($i=0;$i<10;$i++)) and the "foreach" refers to the more Perlish style (for $i (1..10)).

Yes, however for and foreach are interchangeable since perl automatically detects which one to use.