title: Reading an entire file into a hash in Perl
body: <p>I have some problems reading a file into a hash in Perl.</p>
  
  <pre><code>Chr1_supercontig_000000000  1   500
      PILOT21_588_1_3_14602_59349_1
  Chr1_supercontig_000000001  5   100
      PILOT21_588_1_21_7318_90709_1
      PILOT21_588_1_43_18803_144592_1
      PILOT21_588_1_67_13829_193943_1
      PILOT21_588_1_42_19678_132419_1
      PILOT21_588_1_67_4757_125247_1
  ...
  </code></pre>
  
  <p>So I have this file above. My desired output is a hash with the "Chr1"-lines as key, and the "PILOT"-lines as values. </p>
  
  <pre><code>Chr1_supercontig_000000000 =&gt; PILOT21_588_1_3_14602_59349_1
  Chr1_supercontig_000000001 =&gt; PILOT21_588_1_21_7318_90709_1, PILOT21_588_1_43_18803_144592_1,...
  </code></pre>
  
  <p>As far as I know, multiple values can be assigned to a key only by reference, is that correct?</p>
  
  <p>I got stuck at this point and need help.</p>