my $dbh = DBI->connect(..., {RaiseError => 1}); my $sth = $dbh->prepare(<= ? ) AND name = ? ) ) ORDER BY date_time SQL $sth->execute('2009-06-24 23:59:59', '2009-06-24 00:00:00', 'ART_CRV'); my $res = $sth->fetchall_arrayref(); print Dumper($res);