for my $i (1..10) is much more readable than for (my $i=0; $i<10; $i++). In terms of efficiency, they should be comparable. They are both counting loops. The C-style loop should be a bit slower since it does more work on the Perl side.
In reply to Re: for loop syntax difference
by ikegami
in thread for loop syntax difference
by sir_com
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |