別の配列を指す参照配列に問題があります。ネストされた配列Perlのトラブルシューティング
# @bah is a local variable array that's been populated, @foo is also initialized as a global variable
$foo[9] = \@bah;
# this works perfectly, printing the first element of the array @bah
print $foo[9][0]."\n";
# this does not work, nothing gets printed
foreach (@$foo[9]) {
print $_."\n";
}