my $range = Set::IntSpan::Fast->new('50000-65535'); my $ports = Set::IntSpan::Fast->new('50000-51545,51549,51555-51999'); my $unused = $ports->copy; $unused->invert; my $unused_in_range = $range->intersection($unused); my $first_unused = ($unused_in_range->iterate_runs->())[0];
In reply to Re: fastest way to compare two arrays
by repellent
in thread fastest way to compare two arrays
by krusty
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |