[Israel.pm] לולאת for בפרל

Gaal Yahas gaal at forum2.org
Sun Oct 13 01:08:25 PDT 2013


That used to be true in old versions of Perl, but has not been the case for
a while.

  perl -Mv5.10 -e 'last for (1..1<<31); say "whew"'

Speaking of versions of perl, wouldn't a tutorial be better off using
modern features like "say" over "print"?



On Sun, Oct 13, 2013 at 11:02 AM, Yossi Itzkovich <
Yossi.Itzkovich at 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-bounces at perl.org.il [mailto:perl-bounces at 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 <gabor at 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 at 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 at perl.org.il
> http://mail.perl.org.il/mailman/listinfo/perl
>



-- 
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.perl.org.il/pipermail/perl/attachments/20131013/04a85c5f/attachment-0001.htm 


More information about the Perl mailing list