Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: loop iterator in a string

by haukex (Archbishop)
on Sep 27, 2021 at 18:46 UTC ( [id://11137062]=note: print w/replies, xml ) Need Help??


in reply to loop iterator in a string

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.

Replies are listed 'Best First'.
Re^2: loop iterator in a string
by Anonymous Monk on Sep 28, 2021 at 13:20 UTC
    I absolutely love this idea. Thank you for the suggestion!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11137062]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 20:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found