Quoth the CPAN:
print $set->as_string(), "\n"; # prints 1,3,5,7,9,100-1000000
It sounds like Set:IntSpan already does what you want. Just keep reading down the page a little further to Getting Set Contents
In reply to Re: Get ranges from a list of numbers (like 1,2,3 => 1-3)
by SuicideJunkie
in thread Get ranges from a list of numbers (like 1,2,3 => 1-3)
by Doctrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |