Re: Iterate X times

2009-09-14 Thread Moritz Lenz
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

Re: Iterate X times

2009-09-14 Thread Christian Sturm
Jan Ingvoldstad wrote: Here's one using the upto operator: > *SNIP* Thanks!

Re: Iterate X times

2009-09-14 Thread Christian Sturm
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