perl (3)---hash

print “Please input the name\n”;
chomp($name=);
%name_value=(“pxy”,“庞兴艳”,“cjl”,“陈家乐”,“xdz”,“消得志”);
if(exists $name_value{$name}){
print “\n—–Infomation—-$name_value{$name}\n”;
}else{
print “\nsorry is not infomation in here\n”;

}

你可能感兴趣的:(perl (3)---hash)