Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: array of arrays or not

by poolpi (Hermit)
on Feb 23, 2009 at 10:51 UTC ( #745742=note: print w/ replies, xml ) Need Help??


in reply to array of arrays or not

#!/usr/bin/perl use strict; use warnings; use Set::IntSpan; use Data::Dumper; my $set1 = new Set::IntSpan "1-5, 15-20, 30-35, 50-55, 65-70"; my $set2 = new Set::IntSpan "9-35"; my $i_set = $set2 * $set1; my $inter = elements $i_set; print Dumper $inter; __END__ Output: ------ $VAR1 = [ 15, 16, 17, 18, 19, 20, 30, 31, 32, 33, 34, 35 ];


hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb


Comment on Re: array of arrays or not
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (18)
As of 2015-07-30 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls