in reply to Difference between for and foreach
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++) { ... }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Difference between for and foreach
by wolfger (Deacon) on Sep 18, 2007 at 13:11 UTC | |
by Joost (Canon) on Sep 21, 2007 at 23:45 UTC |