title: How do I create a hash of hashes from Spreadsheet::ParseExcel data?
body: <p>I am working with the <a href="http://p3rl.org/Spreadsheet%3a%3aParseExcel" rel="nofollow">Spreadsheet::ParseExcel</a> module. I want to create a hash of hash with the Excel data:</p>
  
  <pre><code>{
      'P343453' =&gt; {
          'Date'   =&gt; 03022011,
          'Method' =&gt; 'No',
          'Time'   =&gt; 1440,
      },
      'P343763' =&gt; {
          'Date'   =&gt; 03022011,
          'Method' =&gt; 'YES',
          'Time'   =&gt; '1745',
      }
  }
  </code></pre>
  
  <p>What I have now is something like this:</p>
  
  <pre><code>{
      'P343453' =&gt; [
          '03022011',
          'No',
          '1440',
      ],
      'P343763' =&gt; [
          '03022011',
          'YES',
          '1745',
      ],
  }
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>my @worksheets = $workbook-&gt;worksheets();
  warn "More than 1 worksheet found\n" if @worksheets &gt; 1;
  
  # Only work with first page.
  my $worksheet = $worksheets[0];
  
  my ( $row_min, $row_max ) = $worksheet-&gt;row_range();
  my ( $col_min, $col_max ) = $worksheet-&gt;col_range();
  my @required_col = (1 .. $col_max);
  my @value;
  
  ##to get the headers of the excel file;
  for my $row ( 0 .. 0 ) {
      @value = map {
          my $cell = $worksheet-&gt;get_cell($row, $_);
          $cell ? $cell-&gt;value() : '';
      } @required_col;
  }
  
  # Skip header row
  my $sample_details = {};
  for my $row (1  .. $row_max ) {
      my @data = map {
          my $cell = $worksheet-&gt;get_cell($row, $_);
          $cell ? $cell-&gt;value() : '';
      } @required_col;
      $sample_details-&gt;{$worksheet-&gt;get_cell($row,0)-&gt;value()} = \@data
          if defined $worksheet-&gt;get_cell($row, 0)-&gt;value();
  }
  </code></pre>
  
  <p>How should I modify the code to assign the keys to the hashrefs of the hash from the array <code>@value</code>?</p>