大佬教程收集整理的这篇文章主要介绍了如何使用散列作为Perl子例程的参数?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
%first_hash = gen_first_hash(); %second_hash = gen_second_hash(); do_stuff_with_hashes(%first_hash,%second_hash); sub do_stuff_with_hashes { my %first_hash = shift; my %second_hash = shift; # do stuff with the hashes }
我收到以下错误:
Odd number of elements in hash assignment at ./gen.pl line 85. Odd number of elements in hash assignment at ./gen.pl line 86. Use of uninitialized value in concatenation (.) or String at ./gen.pl line 124. Use of uninitialized value in concatenation (.) or String at ./gen.pl line 143.
第85行和第86行是子程序中的前两行,124和143是我访问哈希的位置。当我查看这些错误时,似乎表明我的哈希值未初始化。但是,我可以验证散列值是否具有值。为什么我得到这些错误?
以上是大佬教程为你收集整理的如何使用散列作为Perl子例程的参数?全部内容,希望文章能够帮你解决如何使用散列作为Perl子例程的参数?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。