my $dbh = DBI->connect('dbi:DBM:', ... my $sql = " SELECT Rating, BannerPath FROM table WHERE Season = ? AND Rating > ? "; my $sth = $dbh->prepare($sql); $sth->execute( 'Season', 6.0 );; $sth->dump_results if $sth->{NUM_OF_FIELDS}; $dbh->disconnect;