my $data = qq[SELECT COUNT(*) FROM questions WHERE `q1` = "upright"]; my @results = $dbh->selectrow_array($data); print $results[1];