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"; }

相關文章
相關標籤/搜索