本文重點給各位附上perl哈希的一個示例解析,Perl語言和其他編程語言各有各的特點,趕緊跟隨武林技術(shù)頻道的小編一起來學(xué)習(xí)吧。
?
以下為輸出結(jié)果:
??? F:/>perl/a.pl?
??? KubrickGoonies was directed by Spielberg.?
??? The Shining was directed by Kubrick.?
??? Ten Commandments was directed by DeMille.?
??? DeMille directe the Ten Commandments.?
??? Spielberg directe the Goonies.?
??? Kubrick directe the The Shining.?
??? Goonies Spielberg The Shining Kubrick Ten Commandments DeMille?
??? DeMille directe the Ten Commandments.?
??? Spielberg directe the Goonies.?
??? Kubrick directe the The Shining.?
??? F:/>
#----測試哈希key的方法:
if(exists $hash{keyval})?
{?
}?
#----刪除關(guān)鍵字:
delete hash {keyval};
#---清空哈希:
%hash=();
以上就是小編分享的perl哈希的一個示例解析,希望本文的內(nèi)容對大家的學(xué)習(xí)或者工作能帶來一定的幫助,如果有疑問大家可以留言交流。
新聞熱點
疑難解答
圖片精選