Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: do 45-47 to array 45,46,47

by daxim (Chaplain)
on Jul 01, 2013 at 12:54 UTC ( #1041844=note: print w/ replies, xml ) Need Help??


in reply to do 45-47 to array 45,46,47

Shortest code is best code! Use Set::IntSpan to handle your newsrc intspans.
Set::IntSpan->new('45-48, 88-99, 102-124')->elements
Return value is the list:
( 45, 46, 47, 48, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, )

Replies are listed 'Best First'.
Re^2: do 45-47 to array 45,46,47
by marto (Bishop) on Jul 01, 2013 at 14:58 UTC

    "Shortest code is best code!"

    I guess that depends on what you consider the totlal count of lines to be. The module you use is 2737 lines long ;)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2016-06-28 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (348 votes). Check out past polls.