Notice that foreach has been removed from Perl 6. As specified in S04:
There is no foreach statement any more. It's always spelled for in Perl 6, so it always takes a list as an argument...And the Perl 5 C-style for loop is now spelled loop. Quoting S04 again:
The loop statement is the C-style for loop in disguise:loop ($i = 0; $i < 10; $i++) { ... }
In reply to Re: Difference between for and foreach
by eyepopslikeamosquito
in thread Difference between for and foreach
by dilip_val
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |