【发布时间】:2016-05-06 15:14:25
【问题描述】:
我需要使用数组元素作为键来创建具有不同深度的多维散列。伪代码尝试:
示例行:
Statement Coverage 例如 Hierarchical/path/with/block/and/module ...
if (/Statement Coverage for instance (.&?) /)
{
@array = split /\//, $1;
}
for (my $eye = 1; $eye <= $#array; $eye++)
{
A miracle happens to %hash!
}
$hash{"path"}{"with"}{"block"}{"and"} 现在的值为 "module"。请记住,键的数量可能会有所不同。有什么想法吗?
【问题讨论】:
-
完全不清楚你在问什么。请了解如何创建minimal reproducible example。另外,
$eye?