本文介绍了在哈希搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的程序中有一个哈希。
问题是我需要在哈希中搜索,但有一些键是相同的,但我需要得到所有这些的相关值当我做一些像
$ value = $ hash {" theKey"显然我只得到与名为theKey的第一个键相关联的值。$; b $ b。我怎样才能得到其他人?某种循环?
谢谢
There is a hash in my program.
The problem is I need to search in the hash, but there are some keys that are identical, but I need to get the associated value of all these keys.
when I do something like
$value = $hash{ "theKey" };
obviously I''m only getting the value associated to the first key called "theKey". How can I get the others? Some sort of loop?
thanks
推荐答案
这篇关于在哈希搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!