Can anyone tell me why the heck my if statements aren't working in this
subroutine. Everything else seems to work fine.
Please excuse the debug code...
sub 'pass_verify_syntax {
print "Sub Called\n";
my($p) = @_;
length($p) < $pwmin &&
print "Password too short. Minimum is $pwmin characters.\n";
length($p) > $pwmax &&
print "Password too long. Maximum is $pwmax characters.\n";
print "$p\n";
if ($p =~ /([^a-zA-Z])\1/) {
print "Password cannot contain repeating characters.($1)\n";
}
if (substr($p, 0,8)=~ tr/a-zA-Z//c<2){
die "is this working\n";
}
foreach (unpack('C*', $p)) {
$char = pack("C", $_);
#&'log("verifying character '$char'");
if (index($pwchars, $char) == -1) {
print "Password contains invalid character: '$char'\n";
}
}
return 'ok';
}
Thanks in advance.
Scott
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]