Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: array of arrays or not

by poolpi (Hermit)
on Feb 23, 2009 at 10:51 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-25 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found