title: parsing an xls file using perl
body: <p>i want to parse xls file using perl. The xls file has followed structure which makes parsing a bit tricky; </p>
  
  <pre><code>      col1      col2
  row1  School    1
  row2  Dean      John
  row3  No.stu.   55
  row4  some irrelevant stuff 
  row5  School2   2
  row6  Dean      Tony 
  row7  No. stu.  60 
  row8  some irrelevant stuff
  </code></pre>
  
  <p>the output i would like to achieve is: </p>
  
  <pre><code>      col1 col2 col3
  row1 School Dean No.stu. 
  row2 1      John  55
  row3 2      Tony  60 
  </code></pre>
  
  <p>The module i have been studying so far is <code>Spreadsheet::ParseExcel</code>. Any other module would possibly help me out of here? Regards,</p>
  
  <p>Thanks to @amon  reply which provides a potential way to partially solve my problem. But as a perl beginner, i have a lot difficulties to digest the code. </p>
  
  <p>the parsing part start being over my head from <code>ROW:</code>, what is that used for? And i do not really know</p>
  
  <pre><code>my ($key, $val) = map {$worksheet-&gt;get_cell($row, $_)} $col_min .. $col_max;
  </code></pre>
  
  <p>can i interpret it as that given in the <code>Spreadsheet::ParseExcel</code> documentation: 
              <p><code>for my $row ( $row_min .. $row_max ) {</code></p>
              <code>for my $col ( $col_min .. $col_max ) {</code></p>
              <code>my $cell = $worksheet-&gt;get_cell( $row, $col );}</code></p>
  Also, before jumping into the output part, can i have a look at what have been parsed? Say, is there anyway to print out the variable which have been accumulated into the table <code>%data</code>? I have been struggled for a while. </p>
  
  <p>really appreciated all your help! </p>