尝试运行此脚本时出现此错误 - 在此行
arg 1 to each 的类型必须是散列(不是散列元素)
while (my ($action, $value) = each($cameras{$camera}{$mode})) {
如何修复此错误?
最佳答案
取消引用哈希:
while (my ($action, $value) = each(%{ $cameras{$camera}{$mode} })) {
关于Perl - 错误 "Type of arg 1 to each must be hash (not hash element)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28017616/