Think about Loose Coupling | |
PerlMonks |
Re: loop iterator in a stringby haukex (Archbishop) |
on Sep 27, 2021 at 18:46 UTC ( [id://11137062]=note: print w/replies, xml ) | Need Help?? |
If you don't mind using a dash instead of two dots, you might be interested in Set::IntSpan. See the example of its next method in the Synopsis for how to interate through the set. Just don't use the indirect object syntax as it is shown in the documentation, i.e. write Set::IntSpan->new instead of new Set::IntSpan, use $set->insert($n) instead of insert $set $n, and so on.
In Section
Seekers of Perl Wisdom
|
|