Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 about the Monastery: (5)
As of 2014-09-22 05:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (182 votes), past polls