in reply to Locate missing number in a series

#!/usr/bin/perl my $id = 0 x 25; my @leased = ( 17..25, 1..15 );# or however you set them, order not im +portant substr($id, $_ - 1, 1) = 1 for @leased; $id =~ /0/ and print "available $+[0]\n";