我有一个哈希看起来像这样的哈希值的数组:
$VAR1 = {
'file' => [
{
'pathname' => './out.log',
'size' => '51',
'name' => 'out.log',
'time' => '1345799296'
},
{
'pathname' => './test.pl',
'size' => '2431',
'name' => 'test.pl',
'time' => '1346080709'
},
{
'pathname' => './foo/bat.txt',
'size' => '24',
'name' => 'bat.txt',
'time' => '1345708287'
},
{
'pathname' => './foo/out.log',
'size' => '75',
'name' => 'out.log',
'time' => '1346063384'
}
]
};
我怎样才能在一个循环中,这些“文件条目”迭代,并访问其价值? 它是更容易复制my @array = @{ $filelist{file} };
所以我只有散列数组?