- die "localhost_number > 16\n"
- if $localhost_number > 16;
- die "localhost_number > 10\n"
- if $localhost_number > 10 && ($base != 62);
+ if ($localhost_number =~ /\D/) {
+ die "localhost_number must be a number >=0\n";
+ } elsif ($localhost_number =~ /^\d*$/) {
+ die "localhost_number > 16\n"
+ if $localhost_number > 16;
+ die "localhost_number > 10\n"
+ if $localhost_number > 10 && ($base != 62);
+ } else {
+ warn "clearing localhost_number - was $localhost_number\n";
+ undef $localhost_number;
+ $nolocalhost_number=TRUE;
+ }