Hi,
If you want to lookup a key of a hash, this should work
#@myNames = ('Moe', 'Shemp', 'skie','blah');
$newduserid=newuseridentered
%myNames = (
userid1 => Moe, 20, male
userid2 => Shemp, 30,male
userid3, => skie, 40,,male
userid4 => blah ,50,male);
if (exists $myNames{$newduserid}){
print" $userid1 is most probabley has been registed before. \n";
}else{ print
print" you are encouraged to registe again. \n";
}
I hope that is what you want.
Cheers,
Cheers,
Dat
Programming and creating plugins and templates
Blog
If you want to lookup a key of a hash, this should work
Code:
#@myNames = ('Moe', 'Shemp', 'skie','blah');
$newduserid=newuseridentered
%myNames = (
userid1 => Moe, 20, male
userid2 => Shemp, 30,male
userid3, => skie, 40,,male
userid4 => blah ,50,male);
if (exists $myNames{$newduserid}){
print" $userid1 is most probabley has been registed before. \n";
}else{ print
print" you are encouraged to registe again. \n";
}
I hope that is what you want.
Cheers,
Cheers,
Dat
Programming and creating plugins and templates
Blog