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


in reply to Re^2: Interview Prepration
in thread Interview Prepration

The difference between "for" and "foreach" is four characters of extra typing for the latter. Other than that they are the same. Because you apparently associate one of the words with a Perl-style loop and another with a C-style loop is not sufficient reason to say that "for" is different from "foreach". The words may have a different history, but their use in scripts is identical.