perl (3)---hash

print "Please input the name\n"; chomp($name=<STDIN>); %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"; }

相关文章
相关标签/搜索