如何在不使用循环的情况下在Perl中加入两个哈希值? [英] How can I join two hashes in Perl without using a loop?
本文介绍了如何在不使用循环的情况下在Perl中加入两个哈希值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Perl中添加散列a到散列b而不使用循环?他们的数据,只是:
%c =(%a,%b);
How do I append hash a to hash b in Perl without using a loop?
解决方案
If you mean take the union of their data, just do:
%c = (%a, %b);
这篇关于如何在不使用循环的情况下在Perl中加入两个哈希值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文