#!/usr/bin/perl -w use strict; use DBI; my $dbh = DBI->connect("dbi:mysql:db:dbserver", "user", "password") or die "could not connect\n"; my $sth = $dbh->prepare("Select count from csresult where sig = '024b1680d57f61df3b3236f0c9321ce7'"); $sth->execute(); while(my $data = $sth->fetchrow_hashref()) { print "count:$data->{count}\n"; }