我正在尝试在嵌套的 for/foreach 循环中使用哈希。见来源
用strict
它说
Global symbol "$mapping" requires explicit package name at ./test2.pl line 39.
Execution of ./test2.pl aborted due to compilation errors.
没有strict
,
Use of uninitialized value $mapping in hash element at ./test2.pl line 46, <$fh> line 8.
Use of uninitialized value in concatenation (.) or string at ./test2.pl line 46, <$fh> line 8.
print $hashref->{$mapping}
输出中为空。
错误是什么?