title: How to split a variable in Perl on tab character?
body: <p>I have a variable <code>$results</code> generated by the following <code>foreach</code>loop</p>
  
  <pre><code>my $result = "";
  foreach $c1(sort {$a&lt;=&gt;$b} keys %info ) {
      $result .= $c1 . "\t" .
        join(',',@{$info{$c1}-&gt;{var1}}) . "\t" . 
        join(',',@{$info{$c1}-&gt;{var2}}) . "\n";
  }
  </code></pre>
  
  <p>If I print the results it looks like this</p>
  
  <pre><code>a    b    c
  c    d    e
  f    g    h
  </code></pre>
  
  <p>So there are three columns seperated by <code>\t</code> and the lines are separated by <code>\n</code>.
  I now want to split this <code>$results</code> variable by tab, to end up with 3 columns. I tried to do this with a while loop, but it's not working</p>
  
  <pre><code>while($result){
      my @columns = split("\t"); 
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>