title: Processing a tab-delimited file and storing fields in a complex data structure
body: <p>I am attempting to process the following file:</p>
  
  <p><a href="http://bioinfo.mc.vanderbilt.edu/TSGene/Human_716_TSGs.txt" rel="nofollow">http://bioinfo.mc.vanderbilt.edu/TSGene/Human_716_TSGs.txt</a></p>
  
  <p>...which consists of 700+ records with 11 tab separated fields per record. Each record consists of the same repeated categories, i.e., GeneID, Gene_symbol, Alias, Xref, Chromosome, Cytoband, Full_name, Gene_type, Description, Nucleotide_Sequence, and Protein_Sequence. I would like to extract all the GeneIDs (the first field in all records), all of the cytobands, and the all of the protein sequences and construct a complex data structure, e.g:</p>
  
  <pre><code>$genes-&gt;{$gene_name}{$cytoband} = $protein_sequence;
  </code></pre>
  
  <p>My issue is I have only been able to grab the first record (11 fields) and assign them to a list. I don't know how to capture and store all of the fields which comprise one column. My initial attempt is below:</p>
  
  <pre><code>use strict;
  use warnings;
  use autodie;
  
  my ($gene, $symbol, $alias, $xref,
      $chromo, $cytoband, $full_name, $gene_type, $desc, $nuc_seq, $pro_seq);
  
  open FH, '&lt;', 'human_tsgs.txt';
      my @data = do {local $/; &lt;FH&gt;};
  close FH;
  
  for (@data)
  {
      ($gene, $symbol, $alias, $xref, $chromo, $cytoband,
       $full_name, $gene_type, $desc, $nuc_seq, $pro_seq) = split "\t", $_;
  
       #print $gene, "\n";
  }
  </code></pre>
  
  <p>Any constructive feedback would be appreciated.</p>
  
  <p>Thanks!</p>
  
  <p>Caitlin</p>