Iterate through Array of Hashes in a Hash in Perl

前端 未结 2 1307
小蘑菇
小蘑菇 2021-01-05 19:41

I have an Array of Hashes in a Hash that looks like this:

$VAR1 = {
          \'file\' => [
                      {
                        \'pathname\' =         


        
2条回答
  •  逝去的感伤
    2021-01-05 19:53

    No need to copy:

    foreach my $file (@{ $filelist{file} }) {
      print "path: $file->{pathname}; size: $file->{size}; ...\n";
    }
    

提交回复
热议问题