my $range=Set::Range->new(\%set); print $range->getState('19', NUM_RANGE); # prints "2"