#!/usr/bin/perl use strict; use warnings; use SQL::Abstract; my $sql = SQL::Abstract->new; my %where = ( datum => { -between => ['(DATESUB(CURDATE(), INTERVAL 6 DAY)', 'CURDATE()'] } ); my ($sth, @bind) = $sql->select('table', 'id', \%where); print $sth,"\n";