strange if-else problem
From: Graeme McLaren (iamnotregistered_at_hotmail.com)
Date: 02/28/05
- Next message: Cristi Ocolisan: "Perl and Semantic web"
- Previous message: Robert: "Re: Testing question"
- Next in thread: Marcello: "Re: strange if-else problem"
- Reply: Marcello: "Re: strange if-else problem"
- Reply: Jay: "Re: strange if-else problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: beginners@perl.org Date: Mon, 28 Feb 2005 10:07:49 +0000
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:
if($password =~ /\S\S\d\d\S\S/){
#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(\@users, $count);
print "username changed from \"$old_username\" to
\"$new_username\" using password \"$password\" \n";
}else{
handle_error($error, \@users, $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 :)
- Next message: Cristi Ocolisan: "Perl and Semantic web"
- Previous message: Robert: "Re: Testing question"
- Next in thread: Marcello: "Re: strange if-else problem"
- Reply: Marcello: "Re: strange if-else problem"
- Reply: Jay: "Re: strange if-else problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]