title: Perl parsing hash of hashes of arrays
body: <p>I am trying to parse .dmp files that contain a hash of hashes of arrays. I need to get the key value pair from the arrays so I can store them into a mysql database. I've tried several methods but can't get it to work properly. </p>
  
  <p>The code in the files looks like this: 
  I need to store one hash of arrays per row in the database</p>
  
  <pre><code>$VAR={  'booktodo-yzi07mwp-1102021083' =&gt; {
      '_modtime' =&gt; [
        1102021143
      ],
      'version' =&gt; [
        '25'
      ],
      'pubnum' =&gt; [
        '2332'
      ],
      '_status' =&gt; [
        'active'
      ],
      '_user' =&gt; [
        'lcm'
      ],
      'description' =&gt; [
        'Revise trademarks'
      ]
    },
    'booktodo-p8ekw9d3-1104950962' =&gt; {
      '_modtime' =&gt; [
        1104950986
      ],
      'version' =&gt; [
        '3.0'
      ],
      'pubnum' =&gt; [
        'S-2326-30'
      ],
      '_status' =&gt; [
        'active'
      ],
      '_user' =&gt; [
        'malz'
      ],
      'description' =&gt; [
        'Send out a request for install guide changes'
      ]
    },
  </code></pre>
  
  <p>This is what I have so far. I am just trying to access the elements in the arrays
  Thanks!</p>
  
  <pre><code>#!/usr/bin/perl
  
  use DBI;
  use strict;
  use Data::Dumper;
  use File::Slurp;
  use lib "$ENV{HOME}/modules/lib";
  
  my %VAR;
  
  #open DMP;
  open (FILE, "&lt;./booktodo.dmp") or die "could not open file: $!";
  undef $/;
  
  
  #store evaled data in %VAR hash
  %VAR = &lt;FILE&gt;;
  close(FILE);
  eval %VAR;
  
  foreach my $loop (keys %VAR){
      foreach my $hash (keys $VAR{$loop}){
           for my $i (0..$#{$VAR{$loop}}){
                  print "$i= $VAR{$loop}[$i]\n";
           }
      }
  }
  </code></pre>