Help for this page

Select Code to Download


  1. or download this
    my $range = Set::IntSpan::Fast->new('50000-65535');
    my $ports = Set::IntSpan::Fast->new('50000-51545,51549,51555-51999');
    ...
    my $unused_in_range = $range->intersection($unused);
    
    my $first_unused = ($unused_in_range->iterate_runs->())[0];