Moritz Lenz wrote:
No.
for ^5 { say "hi" }
I don't define any variable to be incremented, and it's not really that
many keystrokes.
I knew about the upto operator, but somehow it didn't come to my
mind.
Thanks for your help!
Greetings,
Christian
Jan Ingvoldstad wrote:
Here's one using the upto operator:
> *SNIP*
Thanks!
Christian Sturm wrote:
> do you know a short and easy way to iterate a block X times?
Aye ;-)
> 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
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