title: Perl mysql, why does this fetchrow_array not work?
body: <p>I have Perl code like so: </p>
  
  <pre><code>$pre = $dbh-&gt;prepare("select distinct skills from people");
  $pre-&gt;execute;
  
  my @preList;
  while (my $row = $pre-&gt;fetchrow_array()) {
      push (@preList,$row);
  }
  print "Pre list: $_" foreach @preList;
  </code></pre>
  
  <p>When I try the exact same statement in sql it works perfectly, but when I run this program it prints out nothing (suggesting an empty <code>@preList</code>). I am probably doing something very stupid, but cannot see it. I have used this format for getting data before, which works perfectly. Can anyone see what I've done wrong? </p>