in reply to Re: Next unused sequential number
in thread Next unused sequential number

Thank you for your collective wisdome perl monks. I found This to be quite helpful:
Alternatively, you can make use of the fact the list is sorted (again, + untested): my @uids = ....; # List of sorted uids my $uid = 1001; for (my $i = 0; $i < @uids; $i++) { next if $uids[$i] < $uid; last unless $uids[$i] == $uid; $uid++; } say "First unused uid: $uid";
My day is going well now!