The foreach keyword is actually a synonym for the for keyword, so you can use foreach for readability or for for brevity. (Or because the Bourne shell is more familiar to you than csh, so writing for comes more naturally.)So the correct response to : "What is the difference between for and foreach?" is "The keywords or the loop structures?"
In reply to Re^8: Interview Prepration
by RazorbladeBidet
in thread Interview Prepration
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |