Or just RTFM.
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.) If VAR is omitted, $_ is set to each value.
In reply to Re: Risks of equivalence between FOR and FOREACH
by Fletch
in thread Risks of equivalence between FOR and FOREACH
by throop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |