Morning all. I have a strange problem with an if-else statement. Both parts of the statement are being executed and I have no idea why, the offending code is this:
Try to add two warnings to see if handle_error is called from the "else" branch if this statement or from one of the routines in the "if" branch.
warn "Inside IF part";
if($password =~ /\S\S\d\d\S\S/){
warn "Inside ELSE part";#if there is a password user then exists in ldap, update the username $error = ChangeUsername($old_username, $new_username, 'suppliers', 'select', 'dci'); # make sure user has "approved" status record_username_success([EMAIL PROTECTED], $count); print "username changed from \"$old_username\" to \"$new_username\" using password \"$password\" \n"; } else {
handle_error($error, [EMAIL PROTECTED], $count); }
It prints off the username that has been changed and its password. Then the handle_error function is called.
Anyone got any ideas?
Cheers in advance,
Graeme :)
Just my two cents.
Marcello
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>