Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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, )


Comment on Re: do 45-47 to array 45,46,47
Select or Download Code
Re^2: do 45-47 to array 45,46,47
by marto (Chancellor) 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 contemplating the Monastery: (5)
As of 2014-11-28 03:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (192 votes), past polls