> perl -e '@arr = (1,2,3);$_++ foreach @arr;print @arr,"\n"' 234
By aliasing the loop variable, we gain the power to use foreach (and grep and map...) to create simple list operations without dealing with index syntax.
In reply to Re^3: Tricky scope problem
by kennethk
in thread Tricky scope problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |