The first one uses the range operator which got improved in recent Perls (read about it somewhere...looking for it). On Oct 13, 2013 10:02 AM, "Yossi Itzkovich" <yossi.itzkov...@ecitele.com> wrote:
> Hi,**** > > ** ** > > From past experience, using the first style for very large number can > cause severe performance problems, and even crashes, due to the size of > the list that is built. **** > > It doesn't matter if you exit the loop after one iteration.**** > > ** ** > > Yossi**** > > ** ** > > *From:* perl-boun...@perl.org.il [mailto:perl-boun...@perl.org.il] *On > Behalf Of *Roey Almog (Infoneto Ltd) > *Sent:* Sunday, October 13, 2013 10:59 AM > *To:* Perl in Israel > *Subject:* Re: [Israel.pm] לולאת for בפרל**** > > ** ** > > ** ** > > Hi, just to add my 2 cents... > > In my case (win32) but probably on all platforms writing the loop as: > > for my $i (0..9) {...} > > is faster (both in that it takes less time to write and less time to > execute...) then writing it as: > > for (my $i=0; $i <= 9; $i++) {... }**** > > ** ** > > may be someone can say if there is a reason why using the c stile loop is > better ?**** > > ** ** > > Roey**** > > ** ** > > ** ** > > On Sun, Oct 13, 2013 at 6:53 AM, Gabor Szabo <ga...@szabgab.com> wrote:*** > * > > New Perl Tutorial entry translated to Hebrew by Uri Bruck: > > http://he.perlmaven.com/for-loop-in-perl > > Gabor > _______________________________________________ > Perl mailing list > Perl@perl.org.il > http://mail.perl.org.il/mailman/listinfo/perl**** > > ** ** > > This e-mail message is intended for the recipient only and contains > information which is CONFIDENTIAL and which may be proprietary to ECI > Telecom. If you have received this transmission in error, please inform us > by e-mail, phone or fax, and then delete the original and all copies > thereof. > > _______________________________________________ > Perl mailing list > Perl@perl.org.il > http://mail.perl.org.il/mailman/listinfo/perl >
_______________________________________________ Perl mailing list Perl@perl.org.il http://mail.perl.org.il/mailman/listinfo/perl