以下為輸出結(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=();
新聞熱點
疑難解答