in reply to loop iterator in a string
DB<53> say for eval "2,4..9" 2 4 5 6 7 8 9
NB: this might lead to problems with large intervals though, because foreach can't tell when to iterate lazily. But good enough if you don't intend to scale large.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: loop iterator in a string
by Anonymous Monk on Sep 27, 2021 at 18:41 UTC | |
by haukex (Archbishop) on Sep 27, 2021 at 18:54 UTC | |
by LanX (Saint) on Sep 27, 2021 at 21:12 UTC | |
by haukex (Archbishop) on Sep 28, 2021 at 10:23 UTC | |
by LanX (Saint) on Sep 28, 2021 at 10:53 UTC | |
|