On Sun, Sep 13, 2009 at 5:14 PM, Christian Sturm wrote:
> Hi,
>
> do you know a short and easy way to iterate a block X times?
>
Here's one using the upto operator:
for ^$X {
$s *= $s;
}
--
Jan
Hi,
do you know a short and easy way to iterate a block X times?
I know, one could use while, for, ... but there are some reasons,
why they don't fit.
All these versions are long. I really like Perl, because you can
do thing with shorter code. In all these loops you must define a
variable which
Darren Duncan wrote:
I think that it would be better to pick the other meaning of C<^4>
instead, meaning C<0..3>, because that keeps the meaning of "^"
consistent as "up to but not including". Then also saying ^4 means you
get a range of 4 elements, so there is that consistency too.
Also, th
pugs-comm...@feather.perl6.nl wrote:
Author: moritz
Date: 2009-09-13 19:42:10 +0200 (Sun, 13 Sep 2009)
New Revision: 28233
Modified:
docs/Perl6/Spec/S03-operators.pod
Log:
[S03] ^4 cannot mean 0..3 and 0..^4 at the same time, because they are not the
same
The unary C<^> operator generates
Author: finanalyst
Date: 2009-09-13 21:29:01 +0200 (Sun, 13 Sep 2009)
New Revision: 28235
Modified:
docs/Perl6/Spec/S03-operators.pod
Log:
clarifying ^4 in a range and including a fractional example
Modified: docs/Perl6/Spec/S03-operators.pod
===
Author: moritz
Date: 2009-09-13 19:42:10 +0200 (Sun, 13 Sep 2009)
New Revision: 28233
Modified:
docs/Perl6/Spec/S03-operators.pod
Log:
[S03] ^4 cannot mean 0..3 and 0..^4 at the same time, because they are not the
same
Modified: docs/Perl6/Spec/S03-operators.pod
==
Author: moritz
Date: 2009-09-13 19:42:03 +0200 (Sun, 13 Sep 2009)
New Revision: 28232
Modified:
docs/Perl6/Spec/S05-regex.pod
Log:
[S05] since \# is forbidden, s/unescaped/unquoted/
Modified: docs/Perl6/Spec/S05-regex.pod
===
---
Author: jimmy
Date: 2009-09-13 17:23:43 +0200 (Sun, 13 Sep 2009)
New Revision: 28224
Modified:
docs/Perl6/Spec/S03-operators.pod
Log:
[Spec/S03-operators.pod]fixed POD format.
Modified: docs/Perl6/Spec/S03-operators.pod
===
--- do