title: building a hash from a string
body: <p>I have the below string on perl :</p>
  
  <pre><code>my $string = xyz;1;xyz;2;a;2;b;2 
  </code></pre>
  
  <p>i want to build a hash after for this string like below :</p>
  
  <pre><code>my @array =split /;/,$string;
  
  $hash{xyz} =(1,2);
  $hash{b}=(2);
  $hahs{a}=(2);
  </code></pre>
  
  <p>what is the perl way to do this?</p>