or download this
if (defined $status) {
$statement = $dbh->prepare('SELECT COUNT(*) FROM name WHERE status
+ = "' . "$status" . '"') or die DBI->errstr;
...
$sth->execute() or die print "Couldn't execute statement: $DBI::er
+rstr; stopped";
my $count = $sth->fetchrow_array();
$sth->finish;