in reply to Re: Re: Re: Idiomatic optimizations
in thread Idiomatic optimizations
> my $i ||=0 ;
here $i will always turn out to be 0 (because of the my operator), so my $i=0; is more efficient.
How about $i=$i?1:0; - that's also a bit more readable. (at least to my eyes).> $i?$i=1:$i=0;
Joost.
|
|---|