Either use the C style for loop in that case or, if appropriate, do something like for ($start/2..$end/2) with $start and $end both even (but that's rather clunky!).
The Perl style for is very good for iterating over lists so you can do something like for (1.5, 2..4, @moreNumbers). Generally you should think Perl style for first, then C style if you really need it.
In reply to Re^3: optimizing the miller-rabin algorithm
by GrandFather
in thread optimizing the miller-rabin algorithm
by punklrokk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |